filesbox/web/dist/design/designstatic/newJS/common/js/collect.js

2 lines
842 B
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
$(function(){let c;const p=3;let l;a();try{let e=function(t){const o=((new Date().getTime()-c)/1e3).toFixed(1);o>p&&r({stayTime:o},l),a()};var g=e;if(document.addEventListener("visibilitychange",function(){const t=document.visibilityState;t==="hidden"?e():t=="visible"&&a()}),"onpopstate"in window)if(window.onpopstate){const t=window.onpopstate;window.onpopstate=n=>{t(),e()}}else window.onpopstate=e}catch(e){console.log("\u9875\u9762\u8F6C\u573A:",e)}function a(){c=new Date().getTime(),l=d({},window.location)}function d(e={},t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(e,t){const{href:n="",hostname:o="",origin:m=""}=t||{},i=n.replace(m,"");let f="",w="";if(i.indexOf("?")>0){const s=i.split("?");f=s[1],w=s[0]}else w=i;const h=d({hostname:o,params:f,address:i},e);try{}catch(s){console.log("collect:",s)}}});