Waits until the tab is focused, executing a callback function when it happens.
นี่คือเวอร์ชันทั้งหมดของสคริปต์นี้ แสดงเฉพาะเวอร์ชันที่โค้ดมีการเปลี่ยนแปลง