How to solve the problem that setTimeout stops running when chrome minimizes the window

use chrome to open normal slide rotation, minimize the window, switch back every once in a while, and flash more than one slide at a time.
how to implement, like swiper, stop the timer when the window is minimized. Open it again and resume the last movement

some people say that onblur/onfocus is used, but when the console is opened, it is also considered to be a blur stop timer. Is there a better way?

Apr.02,2021

listen visibilitychange event
reference link: https://developer.mozilla.org.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4477c-44ab1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4477c-44ab1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?