Fokus Pengguna pada Tab JavaScript
if (document.hasFocus()) console.log('Tab is active')
emanuallan
if (document.hasFocus()) console.log('Tab is active')