Countdown only when a user is actively on the page

How can I make a countdown only count down when a user is actively looking at the page?

I would like the timer to stop counting if the user goes to another tab.

Thank you,

I saw there’s some plugins that can detect if user is active on the page.

This topic was automatically closed after 70 days. New replies are no longer allowed.