Loading...
PingFang SC'"; const popM = `
温馨提示
检测到加载缓慢,开启网络诊断
今日不再提示
取消
确定
`; popB.innerHTML=popM; popB.getElementsByClassName("cancel")[0].onclick=function(){setTimeout(function(){document.body.removeChild(popB)},200);ignorLabel && localStorage.setItem(ignorKey,new Date())} popB.getElementsByClassName("gotoTest")[0].onclick=function(){ setTimeout(function(){ document.body.removeChild(popB);ignorLabel && localStorage.setItem(ignorKey,new Date()); setTimeout(function(){ window.location.href=getTestUrl(); },500)},300)}; document.body.appendChild(popB); } } function shadowTest(){ const frameId="testFrame"; if(!document.getElementById(frameId)){ const popIf = document.createElement("iframe"); popIf.src = getTestUrl(); popIf.id = frameId; popIf.style="position:absolute;top:-100px;lef:-100px;width:1px;height:1px" document.body.appendChild(popIf); } } const lastCancel = localStorage.getItem(ignorKey); let isF=false; ["/app/wallet","/app/bankcard"].forEach(function(u,i){ if(document.location.href.indexOf(u)>=0){isF=true} }) let popInter=setInterval(function(){ if(!isF && new Date() - lastCancel > igoreTime){ if(performance.now() > loadTime && document.body){ popUp(); clearInterval(popInter) } } if(autoTest && performance.now() > shadowTime && document.body){ shadowTest(); } },500) window.addEventListener("load", function(e){ clearInterval(popInter) if(performance.now() > loadTime){ popUp(); } }) function setIgnore(ele){ if(ignorLabel){ ignorLabel=false; ele.style.background=""; ele.style.borderColor="#8A8AA3"; }else{ ignorLabel=true; ele.style.background="#9cA5ff" ele.style.borderColor="#9cA5ff"; } }