-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd.html
50 lines (47 loc) · 28.4 KB
/
dd.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang='en'>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset='utf-8' />
<link rel="icon"
href="data:image/svg+xml,%3Csvg id='Ebene_1' data-name='Ebene 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 39.16 39.16'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23009fe3; %7D .cls-2 %7B fill: %2329235c; %7D .cls-3 %7B fill: %23575756; %7D %3C/style%3E%3C/defs%3E%3Crect class='cls-1' y='0' width='18.72' height='18.72' rx='5.23' ry='5.23'/%3E%3Crect class='cls-3' x='20.43' y='0' width='18.72' height='18.72' rx='5.23' ry='5.23'/%3E%3Crect class='cls-3' y='20.43' width='18.72' height='18.72' rx='5.23' ry='5.23'/%3E%3Crect class='cls-2' x='20.43' y='20.43' width='18.72' height='18.72' rx='5.23' ry='5.23'/%3E%3C/svg%3E"
type="image/svg+xml">
<title id="unitT"></title>
</head>
<STYLE>
*{box-sizing:border-box;font-family:sans-serif;font-size:12pt;margin:0;padding:0;}body{margin:0;background:#212121;color:#b3b3b3;}#openSys:hover #dateV{opacity:1;}#container{display:flex;position:fixed;height:100vh;width:100vw;background-size:cover;background-repeat:no-repeat;}#framie{max-width:1100px;height:100%;transition:.8s;position:relative;z-index:2;padding-bottom:60px;left:1px;}#framie>iframe{width:100%;height:100%;border:0;background:gray;box-shadow:4px 0 13px -7px #000000;animation:fadeEffect .8s;}@-webkit-keyframes fadeEffect{from{opacity:0}to{opacity:1}}@keyframes fadeEffect{from{opacity:0}to{opacity:1}}#allList{display:flex;height:100vh;min-width:360px;margin:auto;overflow-y:scroll;overflow-x:clip;grid-row-gap:1vh;padding:10px;flex-direction:column;padding-bottom:60px;color:#d9d9d9;text-shadow:0 .5px 0 #1e1e1e;scrollbar-width:none;}#allList::-webkit-scrollbar{display:none;}#allList>div>*{box-shadow:0 0 10px 1px rgb(0 0 0 / 30%),inset 0 0 0 .5px #7b7b7b;}.allExtra{grid-row-gap:.5vh!important;}#sensorList{-webkit-user-select:none;user-select:none;display:grid;gap:1vh;justify-content:center;margin:auto;transition:.8s ease-out;}.clickables:active,#submitBtn:active{transform:scale(.95);-webkit-transform:scale(.95);transition:.1s}.signal{height:20px;border-radius:5px;margin-top:3px;position:relative;overflow:hidden;box-shadow:1px 5px 5px -5px #333 inset;background:#837c7c;}.slider{box-shadow:1px 5px 5px -5px #333 inset;background:#12842b;height:20px;}.sQ{position:absolute;top:2px;width:100%;text-align:center;}.sensorset{display:flex;justify-items:stretch;flex-direction:column;background:#444;padding:4.2px;flex-wrap:nowrap;border-radius:5px;width:165px;overflow:hidden;position:relative;align-items:stretch;cursor:pointer;justify-content:flex-end;}.response{background:#495d88}.online{background:#334B5F}.sensors{padding-bottom:6px;overflow-wrap:break-word;}.row{display:flex;justify-content:space-between;font-size:10pt;}.odd{padding-right:1px;overflow-wrap:anywhere;}.odd:hover{overflow:visible;}.even{word-spacing:-2px;white-space:nowrap;align-self:self-end;}#opener{background:#000000a8;bottom:0;height:55px;z-index:2;width:100%;position:fixed;-webkit-user-select:none;user-select:none;}.open{background:none;display:flex;max-width:200px;align-items:center;margin:auto;padding-bottom:2vh;justify-content:space-between;}.sidenav{-webkit-user-select:none;user-select:none;height:100%;width:280px;position:fixed;z-index:20;top:0;left:-280px;background:#111111d9;transition:.6s;overflow-y:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;}.menueItem{display:grid;justify-content:start;grid-template-columns:25px auto;align-items:center;cursor:pointer;}.numberUnit{font-size:10px;color:#818181;}.nc{word-break:break-all;}.sideNbtn{-webkit-user-select:none;user-select:none;cursor:pointer;position:absolute;bottom:2%;font-size:35px;color:#b3b3b3;}#openSys{left:20px;width:40px;}#closeBtn{right:20px;}#menueList{overflow:scroll;-ms-overflow-style:none;scrollbar-width:none;transition:.2s;width:max-content;max-width:280px;}#menueList::-webkit-scrollbar{display:none;}#menueList div{padding:3px;font-size:17pt;}#dateV{opacity:0;top:10px;writing-mode:vertical-lr;position:fixed;pointer-events:none;}#sysInfo{background:#ffffff17;color:white;transition:.5s;border-radius:5px;width:200px;height:0;overflow:hidden;position:absolute;top:10px;display:flex;flex-direction:column;justify-content:space-evenly;}.syspair{display:flex;justify-content:flex-start;align-items:center;padding:0 4px 0 4px;}.syspair>div{font-size:10pt!important;cursor:pointer;}.syspair div:nth-child(1){text-align:end;width:35%;padding-right:5px;}#submitBtn{height:20px;width:20px;background-color:#d9d9d9;border-radius:50%;margin:auto;text-align:center;display:flex;color:#334b5f;box-shadow:1px 1px 2px 0 #000;align-items:center;justify-content:center;}#cPicker{width:35px;margin:0 15px;}.menueWrap{transition:.5s;height:115px;flex-shrink:999;}.select{-webkit-user-select:all;user-select:all;}input{height:25px;width:84%;font-size:10pt;border:0;background:#444444;text-align:center;color:inherit;border-radius:5px;box-shadow:5px 5px 5px -5px #333 inset;}.input:focus-visible{width:inherit;}input:focus::placeholder{opacity:.2;}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}.context-menu{background:#cecece;height:50px;width:180px;overflow:hidden;-webkit-user-select:none;user-select:none;border-radius:5px;opacity:0;position:absolute;border:solid .5px #7b7b7b;z-index:1;transition:opacity .3s linear;box-shadow:0 10px 20px rgb(0 0 0 / 50%);align-items:center;justify-content:center;}#vendor{color:#000;transition:.1s linear;-webkit-transition:.1s linear;-moz-transition:.5s linear;}#vendor>iframe{border:0;height:60px;width:180px;}@media screen and (max-height:450px){framie{padding-bottom:40px}#opener{height:40px}}@media screen and (max-width:950px){#framie{position:absolute}}@media screen and (max-width:450px){#allList{grid-row-gap:5px;min-width:unset}#opener{height:40px}#framie{padding-bottom:40px}.allExtra{grid-row-gap:2.5px!important}#sensorList{gap:5px}.sensors{padding-bottom:2%}}@media (prefers-color-scheme:dark){.context-menu{background:#121212}}
</STYLE>
<body onload="fetchDD()">
<script>
var columnSet,fDD,cURL,bInput,navOpen,currVal,html,manNav,result,routerIP,sortMode,newAmmount,bgContent,firstRun=1,dataT=[],dataT2=[],isittime=1,tsX=0,teX=0,tsY=0,teY=0,msTs=0,msTe=0,isOpen=0,prevX=0,nTH=0,cText=";expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/user;",lTime=0;async function fetchDD(){document.cookie.includes("IP=")||(mC("IP"),mC("Adapter")),document.cookie.includes("Offline=")||mC("Offline"),document.cookie.includes("Sound=")||mC("Sound"),document.cookie.includes("Background=")||mC("Background"),document.cookie.includes("bgURL=")||mC("bgURL",1),bgContent=document.cookie.slice(document.cookie.indexOf("bgURL=")+6).split(";")[0];const e=(e,t=",")=>{const n=e.slice(0,e.indexOf(";")-1).split(t);return e.slice(e.indexOf(";")+2).split(",;,").map((e=>{const i=e.split(t);return n.reduce(((e,t,n)=>(e[t]=i[n],e)),{})}))};if(nTH%5==0){let e=await fetch("/Status_Lan.live.asp",{method:"GET",credentials:"include"});LanText=await e.text()}nTH++;let t=window.location.href,n=new URL(t).origin;routerIP=n.replace(/^https?:\/\//,"");let o=LanText.slice(LanText.indexOf("dhcp_leases::")+14,-1);o=o.slice(0,o.indexOf("}")),o=o.replace(/\'/g,""),o="Name,IP,MAC,Time,x,IF,y,"+o;var s=o.split(",");let c=Math.floor(s.length/7);for(i=0;i<c;i++)a=7*(i+1)+i,s.splice(a,0,";");let l=e(s=s.toString()),m=LanText.slice(LanText.indexOf("arp_table::")+12,-1);m=m.slice(0,m.indexOf("}")),m=m.replace(/\'/g,""),m="Name,IP,MAC,arp1,IF,arp3,arp4,arp5,"+m;var u=m.split(",");let p=Math.floor(u.length/8);for(i=0;i<p;i++)a=8*(i+1)+i,u.splice(a,0,";");let v=e(u=u.toString()),g=await fetch("/Status_Wireless.live.asp",{method:"GET",credentials:"include"});WiFiText=await g.text();let f=WiFiText.slice(WiFiText.indexOf("active_wireless::")+17,-1);f=f.slice(0,f.indexOf("}"));let y=f.split("','"),h=Math.floor(y.length/17);for(i=0;i<h;i++)a=17*(i+1)+i,y.splice(a,0,";");y=y.toString(),y=y.replace(/ day,/g,"d").replace(/ days,/g,"d"),y=y.slice(1,-1),y="MAC,1,WiFi,Uptime,RX,TX,Mode,3,4,5,Signal,6,7,8,9,10,11,;,"+y;let I=e(y);result=(result=l.map((e=>({...v.find((({MAC:t})=>e.MAC==t)),...e})))).map((e=>({...I.find((({MAC:t})=>e.MAC==t)),...e}))),resultLAN=[...result.filter((e=>!e.Signal))],result=(result=I.map((e=>({...result.find((({MAC:t})=>e.MAC==t)),...e})))).concat(resultLAN),document.cookie.includes("Sort=")||(document.cookie="Sort=NameUP;expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/user;'"),cookieK=document.cookie.split("; "),cookieK.forEach((e=>{e.includes("Sort")&&(sortMode=e.split("=").pop())})),result.forEach((e=>{for(const t in e)null!=e[t]&&""!=e[t]||(e[t]="N.A.");e.hasOwnProperty("Name")||(e.Name="N.A."),e.hasOwnProperty("IP")||(e.IP="N.A.")})),result.forEach((e=>{e.Uptime?.includes("d")&&(3==e.Uptime.split("d")[1].split(":")[0].length?e.Uptime=e.Uptime.replace(" ","0"):e.Uptime=e.Uptime.replace(" ",""))})),(sortMode.includes("Signal")||sortMode.includes("Uptime"))&&(result1=[...result.filter((e=>e.Signal))],result2=[...result.filter((e=>!e.Signal))],result=result1.concat(result2)),result.sort(((e,t)=>sortMode.includes("Name")?e.Name.toLowerCase()===t.Name.toLowerCase()?0:e.Name.toLowerCase()>t.Name.toLowerCase()?1:-1:sortMode.includes("Signal")?e.Signal?e.Signal-t.Signal:-1:sortMode.includes("IP")?e.IP?.split(".").pop()-t.IP?.split(".").pop():sortMode.includes("Uptime")?e.Uptime?e.Uptime?.replace(/d/g,"").split(":",2).join(".")-t.Uptime?.replace(/d/g,"").split(":",2).join("."):-1:void 0)),sortMode.includes("DN")&&result.reverse(),(sortMode.includes("Signal")||sortMode.includes("Uptime"))&&(result1=[...result.filter((e=>e.Signal))],result2=[...result.filter((e=>!e.Signal))],result2.sort(((e,t)=>e.Name.toLowerCase()===t.Name.toLowerCase()?0:e.Name.toLowerCase()>t.Name.toLowerCase()?1:-1)),result=result1.concat(result2)),result.forEach((e=>{e.Uptime?.includes("d0")&&(e.Uptime=e.Uptime.replace("d0","d"))})),html="",result.forEach((e=>{(document.cookie.includes("Offline=1")||document.cookie.includes("Offline=0")&&e.Signal||e.arp1)&&(e.Time?.includes("days")?(d=e.Time.split(" ")[0]+"d ",r=e.Time.split(" ")[2],r=r.split(":"),r.pop(),r=r.join(":"),lTime=d+r):lTime=e.Time?e.Time:"N.A.",bS="",(e.WiFi&&e.Signal||!e.Signal&&e.arp1)&&(bS="online"),dataT2.forEach((t=>{t.MAC==e.MAC&&(e.Signal||e.arp1?!e.Signal&&t.Status>1&&e.arp1?bS="online":e.Signal||1!=t.Status&&!e.arp1||(bS="response"):bS="",e.Signal&&1==t.Status&&(bS="response"))})),html+='<div class=" sensorset sAmmount '+bS,"response"==bS&&(html+=' clickables" onclick="playSound(3000), splitOn(\''+e.IP+"'), topF()"),html+='">',html+='<div class="sensors" id="'+e.IP+'" style="font-weight:bold;">'+e.Name+"</div>",document.cookie.includes("IP=1")&&(html+='<div class=row><div class=odd>IP:</div><div class="even select" id="IP">'+e.IP+"</div></div>"),document.cookie.includes("Adapter=1")&&(""!=bS?e.Signal?html+="<div class=row><div class=odd>Adapter:</div><div class=even>"+e.WiFi+"</div></div>":html+="<div class=row><div class=odd>Adapter:</div><div class=even>LAN</div></div>":html+="<div class=row><div class=odd>Adapter:</div><div class=even>offline</div></div>"),document.cookie.includes("Lease=1")&&(html+="<div class=row><div class=odd>Lease:</div><div class=even>"+lTime+"</div></div>"),document.cookie.includes("Uptime=1")&&(e.Uptime?(0==e.Uptime.split(":")[0]?uT=parseInt(e.Uptime.split(":",2)[1])+" minutes":uT=e.Uptime.split(":",2).join("h")+"m",html+="<div class=row><div class=odd>Up:</div><div class=even>"+uT+"</div></div>"):html+="<div class=row><div class=odd>Up:</div><div class=even>N.A.</div></div>"),document.cookie.includes("MAC=1")?html+='<div class=row style="align-self:center;"><div class="even select" id="MAC">'+e.MAC+"</div></div>":html+='<div class=row style="align-self:center;display:none"><div class="even select" id="MAC">'+e.MAC+"</div></div>",e.Signal?(document.cookie.includes("RX,TX=1")&&(html+="<div class=row><div class=odd>TX:"+e.TX+"</div><div class=even>RX:"+e.RX+"</div></div>"),html+='<div class="signal"><div class="slider" style="width: '+e.Signal/10+'%;"></div><div class="sQ">'+e.Signal/10+"%</div></div>"):(html+='<div class=signal style="opacity: 0;"></div>',document.cookie.includes("RX,TX=1")&&(html+="<div class=row><div class=odd> </div><div class=even> </div></div>")),html+="</div>")})),isittime&&(document.getElementById("sensorList").innerHTML=html,storeData(result),firstRun&&(document.cookie.includes("Sound=")||mC("Sound"),window.navigator.userAgent.match(/iPhone/i)&&(document.body.style.height="101vh"),fDD=setInterval(fetchDD,2e3),checkURL(),longPressS(),longPressN(),addEonce(),firstRun=0),document.getElementById("unitT").innerHTML=routerIP,makeMenu(),changeCss(),longPressB(),eventLS(),conText())}function makeMenu(){symUP="▲︎",symDn="▼︎",sym0="☐︎",sym1="☑︎";let e="",t="";e+='<div class="menueItem">Show:</div>',["IP","Adapter","Lease","Uptime","MAC","RX,TX","Offline"].forEach((t=>{document.cookie.includes(t+"=1")?chkSym=sym1:chkSym=sym0,e+='<div class="menueItem" onclick="mC(\''+t+'\');setTimeout(makeMenu, 500)"><div class="serverUnit" style="text-align: center;">'+chkSym+'</div><div id="Name" class="nc">'+t+"</div></div>"})),e+='<div class="menueItem"> </div>',e+='<div class="menueItem">Sort:</div>',[{sort:["NameUP","NameDN"],name:"Name"},{sort:["SignalUP","SignalDN"],name:"Signal"},{sort:["IPUP","IPDN"],name:"IP"},{sort:["UptimeUP","UptimeDN"],name:"Uptime"}].forEach((t=>{if(document.cookie.includes(t.name+"=1")||!document.cookie.includes(t.name+"=")){for(Array of(sortSym="",t.sort))Array==sortMode&&(Array.includes("UP")?sortSym=symUP:sortSym=symDn);e+='<div class="menueItem" onclick="sorT(\''+t.name+'\');setTimeout(fetchDD, 500);"><div class="serverUnit" style="text-align: center;font-size:12pt;">'+sortSym+'</div><div id="Signal" class="nc">'+t.name+"</div></div>"}})),["Sound","Background"].forEach((e=>{document.cookie.includes(e+"=1")?chkSym=sym1:chkSym=sym0,t+='<div class="syspair" onclick="mC(\''+e+"');setTimeout(makeMenu, 500)\"><div>"+chkSym+"</div><div>"+e+"</div></div>","Background"==e&&(t+='<div class="syspair"><input type="text" id="bgURL" name="bgURL" placeholder="paste background URL"><div id="submitBtn" >✔︎</div></div>',bgC="#14842a",bgContent.startsWith("#")&&(bgC=bgContent),t+='<div class="syspair"><input type="color" id="cPicker" value="'+bgC+'"><div>or pick a color</div></div>')})),document.getElementById("menueList").innerHTML=e,document.getElementById("sysInfo").innerHTML=t}function changeCss(){container=document.getElementById("container"),sBtn=document.getElementById("submitBtn"),document.cookie.includes("Background=1")?bgContent?bgContent.startsWith("#")?(container.style.backgroundImage="none",container.style.backgroundColor=bgContent,sBtn.style.color="black"):(container.style.backgroundImage="url("+bgContent+")",sBtn.style.color="green"):container.style.backgroundImage="url(https://images.pexels.com/photos/2068411/pexels-photo-2068411.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2)":document.cookie.includes("Background=0")&&(container.style.backgroundImage="none",container.style.backgroundColor="unset"),toScale("true")}function toScale(){if(y="",x="auto ",m=null,scaleItm=document.getElementById("sensorList"),tileSize=document.getElementsByClassName("sAmmount")[0],tileAmmount=document.getElementsByClassName("sAmmount").length,tileAmmount>1){isOpen&&"absolute"!=getComputedStyle(document.getElementById("framie")).position?colAmmount=Math.floor((document.body.clientWidth-framie.offsetWidth)/tileSize.offsetWidth)-1:colAmmount=Math.floor(document.body.clientWidth/tileSize.offsetWidth)-1,rowAmmount=Math.floor(tileAmmount/colAmmount),possibleRowAmmount=Math.floor(document.getElementById("container").offsetHeight/tileSize.getBoundingClientRect().height)-1,tileSize.getBoundingClientRect().height*rowAmmount<document.getElementById("container").offsetHeight&&(tileSize.offsetWidth*colAmmount>document.body.clientWidth||colAmmount>rowAmmount)&&(colAmmount=Math.ceil(Math.sqrt(tileAmmount))),document.getElementById("framie").offsetWidth>0&&window.innerWidth<1500&&"absolute"!=getComputedStyle(document.getElementById("framie")).position&&(colAmmount=2),(colAmmount<2||document.cookie.includes("Two=1"))&&(colAmmount=2);for(let e=0;e<colAmmount;e++)y+=x;if(scaleItm.style.setProperty("grid-template-columns",y,m),document.body.clientWidth-20<scaleItm.offsetWidth&&2==colAmmount?(scaleItm.style.transform="scale("+(document.body.clientWidth-20)/scaleItm.offsetWidth+")",xTrans=(scaleItm.offsetWidth+10-scaleItm.offsetWidth*(document.body.clientWidth-20)/scaleItm.offsetWidth)/2,scaleItm.style.translate=-xTrans+"px "+-(scaleItm.offsetHeight-document.body.clientWidth/scaleItm.offsetWidth*scaleItm.offsetHeight)/2+"px"):(scaleItm.style.transform="scale(1)",document.getElementById("sensorList").style.translate="0"),tileAmmount%colAmmount!=0&&isittime){calcTile=colAmmount-(tileAmmount-colAmmount*Math.floor(tileAmmount/colAmmount)),newAmmount=calcTile;for(let e=1;e<=calcTile;e++)html+='<div class="sensorset extra"></div>'}document.getElementsByClassName("extra").length||(document.getElementById("sensorList").innerHTML=html)}}function addEonce(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState?(clearTimeout(fDD),clearTimeout(cURL),checkURL(),fetchDD(),fDD=setInterval(fetchDD,2e3)):(clearTimeout(fDD),clearTimeout(cURL))})),document.addEventListener("touchstart",(e=>{msTs=Date.now(),tsX=e.changedTouches[0].screenX,tsY=e.changedTouches[0].screenY})),document.addEventListener("touchend",(e=>{msTe=Date.now(),teX=e.changedTouches[0].screenX,teY=e.changedTouches[0].screenY,checkDirection()})),document.addEventListener("mousemove",(e=>{manNav||navOpen||(e.clientX<10&&-280===document.getElementById("mySidenav").offsetLeft&&openNav(),e.clientX>280&&0===document.getElementById("sysInfo").offsetHeight&&closeNav())})),document.getElementById("mySidenav").addEventListener("mouseleave",(e=>{manNav||closeNav()})),window.addEventListener("resize",(e=>{isittime=0,clearTimeout(bInput),bInput=setTimeout(blurInput,1e3),toScale()})),document.getElementById("container").addEventListener("click",(e=>{e.target!=document.getElementById("allList")&&e.target!=document.getElementById("container")||iFrClose()}))}function eventLS(){document.querySelectorAll(".select").forEach((e=>{e.addEventListener("click",(e=>{isittime=0,clearTimeout(bInput),bInput=setTimeout(blurInput,1e4),e.stopPropagation()})),e.addEventListener("mouseleave",(e=>{isittime=1,clearTimeout(bInput),e.stopPropagation()}))}));document.querySelectorAll(".sAmmount").forEach((e=>{e.addEventListener("mouseleave",(e=>{isittime=1,clearTimeout(bInput),hideMenu()})),e.addEventListener("touchstart",(function(t){2==t.touches.length&&rightClick(t,e)})),e.addEventListener("touchstart",(function(e){1==e.touches.length&&(isittime=1,clearTimeout(bInput),hideMenu())}))})),document.getElementById("bgURL").addEventListener("click",(e=>{isittime=0,clearTimeout(bInput),bInput=setTimeout(blurInput,1e4)})),document.getElementById("bgURL").addEventListener("focusout",(e=>{isittime=1,clearTimeout(bInput)})),document.getElementById("submitBtn").addEventListener("click",(e=>{playSound(1e3),isittime=1,clearTimeout(bInput),document.cookie="bgURL="+document.getElementById("bgURL").value+cText,fetchDD()})),document.getElementById("bgURL").addEventListener("keypress",(function(e){"Enter"===e.key&&(playSound(1e3),e.preventDefault(),isittime=1,clearTimeout(bInput),document.cookie="bgURL="+document.getElementById("bgURL").value+cText,fetchDD())})),document.getElementById("cPicker").addEventListener("click",(e=>{isittime=0,clearTimeout(bInput),bInput=setTimeout(blurInput,1e4)})),document.getElementById("cPicker").addEventListener("focusout",(e=>{isittime=1,clearTimeout(bInput)})),document.getElementById("cPicker").addEventListener("input",(e=>{document.cookie="bgURL="+document.getElementById("cPicker").value+cText,document.getElementById("container").style.backgroundImage="none",document.getElementById("container").style.backgroundColor=document.getElementById("cPicker").value}))}function splitOn(e){"home"==e&&(e=routerIP),1==isOpen&&window.innerWidth<=950&&e==routerIP?iFrClose():0==isOpen||e!=prevX?iFrOpen(e):iFrClose(),setTimeout(changeCss,100),prevX=e}function iFrOpen(e){isOpen=1,new ResizeObserver(toScale).observe(framie),document.getElementById("framie").style.width="100%",document.getElementById("framie").innerHTML='<iframe src="http://'+e+'"></iframe>',closeNav()}function iFrClose(){isOpen=0,document.getElementById("framie").style.width="0",document.getElementById("framie").innerHTML=""}function longPressN(){document.getElementById("mOpen").addEventListener("long-press",(function(e){window.location.href=routerIP}))}function longPressS(){document.getElementById("closeBtn").addEventListener("long-press",(function(e){e.preventDefault(),mC("Sound")})),document.getElementById("openSys").addEventListener("long-press",(function(e){e.preventDefault(),mC("Two"),e.stopPropagation()})),document.getElementById("nOpen").addEventListener("long-press",(function(e){e.preventDefault(),playSound(1e3),document.body.requestFullscreen()}))}function longPressB(){document.querySelectorAll(".clickables").forEach((e=>{e.addEventListener("long-press",(function(t){t.preventDefault();const n=e.querySelector(".sensors");playSound(1e3),/Android|iPhone/i.test(navigator.userAgent)?window.location.href="http://"+n.id:window.open("http://"+n.id),setTimeout(fetchDD,600),isittime=0,iIV=setTimeout(blurInput,400)}))}))}function playSound(e){document.cookie.includes("Sound=0")&&950!=e||(c=new AudioContext,o=c.createOscillator(),g=c.createGain(),frequency=e,o.frequency.value=frequency,o.type="sawtooth",o.connect(g),g.connect(c.destination),g.gain.setValueAtTime(.05,0),o.start(0),g.gain.exponentialRampToValueAtTime(1e-5,c.currentTime+.01),o.stop(c.currentTime+.01))}function storeData(e){dataT=e}async function checkURL(){for(Array of dataT){let e=0,t=0,n=0,i=0,o=new AbortController;if(setTimeout((()=>o.abort()),1e3),dataT2.find((e=>e.MAC===Array.MAC))){dataT2.find(((e,o)=>(i=o,t=Array.IP,n=Array.Name,!0)))}Array.WiFi&&!Array.Signal||"N.A."==Array.IP||(response=await fetch("http://"+Array.IP,{signal:o.signal,mode:"no-cors"}).then((t=>{e=1})).catch((t=>{["failed","attempting"].some((e=>t.message.toLowerCase().includes(e)))?e=2:t.message.toLowerCase().includes("aborted")&&(e=3)}))),Array.IP&&(t?dataT2[i]={IP:t,Status:e,MAC:Array.MAC}:dataT2.push({IP:Array.IP,Status:e,MAC:Array.MAC}))}cURL=setTimeout(checkURL,5e3)}function conText(){document.querySelectorAll(".sAmmount").forEach((e=>{e.addEventListener("contextmenu",(t=>{rightClick(t,e)}))}))}function hideMenu(){document.getElementById("contextMenu").style.opacity="0",document.getElementById("contextMenu").style.pointerEvents="none"}async function rightClick(e,t){e.preventDefault(),isittime=0,clearTimeout(bInput),bInput=setTimeout(blurInput,1e4),copyE=t,sMAC=copyE.querySelector("#MAC"),sMAC1=sMAC.textContent.split(":").slice(0,3),sMAC1=sMAC1.join(":")+":00:00:00",document.getElementById("vendor").innerHTML='<iframe id="IFR" src="https://api.macvendors.com/'+sMAC1+'"></iframe>';var n=document.getElementById("contextMenu");"none"==document.getElementById("contextMenu").style.display&&(n.style.display="flex",n.style.opacity="1"),n.style.pointerEvents="all",n.style.opacity="1",n.style.left=e.pageX-90+"px",n.style.top=e.pageY+10+"px"}function blurInput(){isittime=1,hideMenu()}function openNav(e){navOpen=1,e&&(manNav=1),-280===document.getElementById("mySidenav").offsetLeft?document.getElementById("mySidenav").style.left="0":closeNav()}function closeNav(){document.getElementById("sysInfo").offsetHeight>0&&openSys(),manNav=0,navOpen=0,document.getElementById("mySidenav").style.left="-280px"}function openSys(){0===document.getElementById("sysInfo").offsetHeight?(document.getElementById("menueWrap1").style.flexShrink="0",document.getElementById("sysInfo").style.height="105px"):(document.getElementById("sysInfo").style.height="0",document.getElementById("menueWrap1").style.flexShrink="999")}function checkDirection(){touchtime=msTe-msTs,touchDistX=teX-tsX,touchDistY=teY-tsY,teX<tsX&&navOpen&&Math.abs(touchDistX)>40&&Math.abs(touchDistY)<30&&touchtime<250&&closeNav(),teX>tsX&&!navOpen&&Math.abs(touchDistX)>40&&Math.abs(touchDistY)<30&&touchtime<250&&openNav()}function topF(){document.body.scrollTop=0,document.documentElement.scrollTop=0}function sorT(e){sortMode.includes("DN")||!sortMode.includes(e)?e+="UP":e+="DN",playSound(900),document.cookie="Sort="+e+cText}function mC(e,t){1==(document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)")?.pop()||"")?(playSound(500),document.cookie=e+"=0;expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/user;"):t?(playSound(900),document.cookie=e+"="+cText):(playSound(900),document.cookie=e+"=1"+cText),"Sound"==e&&document.cookie.includes("Sound=1")&&playSound(950)}!function(e,t){"use strict";var n=null,i="PointerEvent"in e||e.navigator&&"msPointerEnabled"in e.navigator,o="ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,s=i?"pointerdown":o?"touchstart":"mousedown",c=i?"pointerup":o?"touchend":"mouseup",a=i?"pointermove":o?"touchmove":"mousemove",l=i?"pointerleave":o?"touchleave":"mouseleave",d=0,m=0;function r(e){p(),e=function(e){return void 0!==e.changedTouches?e.changedTouches[0]:e}(e),this.dispatchEvent(new CustomEvent("long-press",{bubbles:!0,cancelable:!0,detail:{clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY},clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}))||t.addEventListener("click",(function e(n){t.removeEventListener("click",e,!0),function(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}(n)}),!0)}function u(i){p(i);var o=i.target,s=parseInt(function(e,n,i){for(;e&&e!==t.documentElement;){var o=e.getAttribute("data-long-press-delay");if(o)return o;e=e.parentNode}return"600"}(o),10);n=function(t,n){if(!(e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame&&e.mozCancelRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame))return e.setTimeout(t,n);var i=(new Date).getTime(),o={},s=function(){(new Date).getTime()-i>=n?t.call():o.value=requestAnimFrame(s)};return o.value=requestAnimFrame(s),o}(r.bind(o,i),s)}function p(t){var i;(i=n)&&(e.cancelAnimationFrame?e.cancelAnimationFrame(i.value):e.webkitCancelAnimationFrame?e.webkitCancelAnimationFrame(i.value):e.webkitCancelRequestAnimationFrame?e.webkitCancelRequestAnimationFrame(i.value):e.mozCancelRequestAnimationFrame?e.mozCancelRequestAnimationFrame(i.value):e.oCancelRequestAnimationFrame?e.oCancelRequestAnimationFrame(i.value):e.msCancelRequestAnimationFrame?e.msCancelRequestAnimationFrame(i.value):clearTimeout(i)),n=null}"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var i=t.createEvent("CustomEvent");return i.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),i},e.CustomEvent.prototype=e.Event.prototype),e.requestAnimFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout(t,1e3/60)},t.addEventListener(c,p,!0),t.addEventListener(l,p,!0),t.addEventListener(a,(function(e){var t=Math.abs(d-e.clientX),n=Math.abs(m-e.clientY);(t>=10||n>=10)&&p()}),!0),t.addEventListener("wheel",p,!0),t.addEventListener("scroll",p,!0),t.addEventListener("contextmenu",p,!0),t.addEventListener(s,(function(e){d=e.clientX,m=e.clientY,u(e)}),!0)}(window,document);
</script>
<div id="container">
<div id="contextMenu" class="context-menu" style="display: none">
<div id="vendor"></div>
</div>
<div id="framie"></div>
<div id="mySidenav" class="sidenav">
<div id="sysInfo">no info found...</div>
<div class="menueWrap" id="menueWrap1"></div>
<div id="menueList"></div>
<div class="menueWrap" id="menueWrap2"></div>
<div class="sideNbtn" id="openSys" onclick="openSys()">
<div id="dateV">20290701/2</div>⚙︎
</div>
<div class="sideNbtn" id="closeBtn" onclick="closeNav()">×︎</div>
</div>
<div id="unitId" style="cursor: pointer;" onclick="launchFs(document.documentElement)"> </div>
<div id="allList">
<div id="sensorList"></div>
</div>
<div id="opener">
<div class="open">
<span id="nOpen" style="font-size:30px;cursor:pointer;background:none;"
onclick="openNav(event)">☰︎</span>
<span id="mOpen" style="font-size:30px;cursor:pointer;background:none;"
onclick="splitOn('home'); topF()">⌂︎</span>
</div>
</div>
</div>
</body>
</html>