File manager - Edit - /home/xfekoga/grenier/wp-content/plugins/defender-security/assets/js/idle-session.js
Back
(()=>{"undefined"==typeof wpdef_idle_params&&console.warn("wpdef_idle_params is undefined. Ensure it is properly set for idle detection.");var e,t="undefined"!=typeof wpdef_idle_params&&wpdef_idle_params.timeout?1e3*Number(wpdef_idle_params.timeout):6e4,n=Math.random().toString(36).substring(2,11),i="active",a="undefined"!=typeof BroadcastChannel,d=a?new BroadcastChannel("idle-detection-channel"):null;function o(e){a&&d&&d.postMessage({state:e,timestamp:Date.now(),tabId:n})}function s(){"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 r(){"idle"!==i&&(i="idle",o("idle"),"undefined"!=typeof wpdef_idle_params&&fetch(wpdef_idle_params.ajax_url+"?action=wpdef_logout",{method:"POST",credentials:"same-origin"}).then((function(){s()})).catch((function(){s()})))}function c(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];clearTimeout(e),n||function(){"idle"!==i||arguments.length>0&&void 0!==arguments[0]&&arguments[0]||(i="active",o("active"))}(),e=setTimeout(r,t)}var l=0;function u(){var e=Date.now();e-l<200||(l=e,c())}document.addEventListener("mousemove",u,{passive:!0}),document.addEventListener("wheel",u,{passive:!0}),document.addEventListener("scroll",u,{passive:!0}),document.addEventListener("keydown",c),document.addEventListener("mousedown",c),document.addEventListener("touchstart",c),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState&&c()})),c(),a&&d?(d.onmessage=function(e){var t=e.data,i=t.state;t.timestamp;t.tabId!==n&&"active"===i&&c(!0)},window.addEventListener("unload",(function(){d.close()}))):console.warn("BroadcastChannel API is not supported in this browser. Multi-tab idle detection will not work.")})();
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings