visibilitychange
const vibchage = 'visibilitychange' || 'webkitvisibilitychange' || 'mozvisibilitychange' document.addEventListener(vibchage, function () { });