PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.5.1
Defender Security – Malware Scanner, Login Security & Firewall v5.5.1
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / assets / js / idle-session.js

idle-session.js in Defender Security – Malware Scanner, Login Security & Firewall 5.5.1, at assets/js/idle-session.js

1 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (self.webpackChunkwp_defender=self.webpackChunkwp_defender||[]).push([[73],{4028:()=>{var e;"undefined"==typeof wpdef_idle_params&&console.warn("wpdef_idle_params is undefined. Ensure it is properly set for idle detection.");var t,n="undefined"!=typeof wpdef_idle_params&&wpdef_idle_params.timeout?1e3*Math.min(Number((null===(e=wpdef_idle_params)||void 0===e?void 0:e.timeout)||60),2147483):6e4,i=Math.random().toString(36).substring(2,11),a="active",d="undefined"!=typeof BroadcastChannel,o=d?new BroadcastChannel("idle-detection-channel"):null;function s(e){d&&o&&o.postMessage({state:e,timestamp:Date.now(),tabId:i})}function r(){"undefined"!=typeof wp&&wp.heartbeat&&"function"==typeof wp.heartbeat.connectNow?wp.heartbeat.connectNow():window.location.href=wpdef_idle_params.login_url+"?interim-login=1"}function p(){"idle"!==a&&(a="idle",s("idle"),"undefined"==typeof wpdef_idle_params||wpdef_idle_params.stop||fetch(wpdef_idle_params.ajax_url+"?action=wpdef_logout",{method:"POST",credentials:"same-origin"}).then(function(){r(),wpdef_idle_params.stop=!0}).catch(function(){r(),wpdef_idle_params.stop=!0}))}function l(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];clearTimeout(t),e||function(){"idle"!==a||arguments.length>0&&void 0!==arguments[0]&&arguments[0]||(a="active",s("active"))}(),t=setTimeout(p,n)}var c=0;function u(){var e=Date.now();e-c<200||(c=e,l())}document.addEventListener("mousemove",u,{passive:!0}),document.addEventListener("wheel",u,{passive:!0}),document.addEventListener("scroll",u,{passive:!0}),document.addEventListener("keydown",l),document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&l()}),l(),d&&o?(o.onmessage=function(e){var t=e.data,n=t.state;t.timestamp;t.tabId!==i&&"active"===n&&l(!0)},window.addEventListener("pagehide",function(){o.close()})):console.warn("BroadcastChannel API is not supported in this browser. Multi-tab idle detection will not work.")}},e=>{var t;t=4028,e(e.s=t)}]);