Add a feature to start or pause timer according to page visibility, which will help the user automatic pause timer when the user leaves the page, and start timer when the user comes back.
This feature could be enable or disable in settings, and it is enabled by default.
Changes
add related settings in head.js
call method from Genki to start/pause timer for the popup
use visibilitychange event to detect if page is visible or not
Description
Add a feature to start or pause timer according to page visibility, which will help the user automatic pause timer when the user leaves the page, and start timer when the user comes back.
This feature could be enable or disable in settings, and it is enabled by default.
Changes
visibilitychange
event to detect if page is visible or not