I think isPageVisible() should use setInterval(), I'm not sure if my understanding is correct, I hope to get your help, thanks