Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:addBar();function gInfo() {$.ajax({type:"GET",async:true,url:'/api/model.json?internalapi=1',error:function(request,status,error){console.log("Signal Error:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);},success:function(data){resp=JSON.parse(data);battChargeSource=resp.power.battChargeSource;charging=resp.power.charging;wwan=resp.wwan;sessDuration=Math.floor(wwan.sessDuration/60);SCCcount=wwan.ca.SCCcount;connectionText=wwan.connectionText;dataTransferred=wwan.dataUsage.generic.dataTransferred;battChargeLevel=resp.power.battChargeLevel;total=String((dataTransferred/(1024*1024*1024)).toFixed(2))+" GB";signalStrength=wwan.signalStrength;rsrp=signalStrength.rsrp;rsrq=signalStrength.rsrq;sinr=signalStrength.sinr;rssi=signalStrength.rssi;wwanadv=resp.wwanadv;radioQuality=wwanadv.radioQuality;curBand=wwanadv.curBand;cellId=wwanadv.cellId;mcc=wwanadv.MCC;mnc=wwanadv.MNC;plmn=mcc+mnc;vars=['rssi','rsrp','rsrq','sinr','radioQuality','curBand','cellId','plmn','SCCcount','sessDuration','connectionText','total','battChargeLevel','battChargeSource'];for(i=0;i<vars.length;i++) {$('#'+vars[i]).html(window[vars[i]]);} setgraph('rsrp',rsrp,-130,-70);setgraph('rsrq',rsrq,-16,-3);madebymiononno=1;hex=Number(cellId).toString(16);hex2=hex.substring(0,hex.length-2);enbid=parseInt(hex2,16).toString();$('#enbid').html(enbid);if(plmn=='22201'){plmn='2221';} if(plmn=='22299'){plmn='22288';} if((plmn=='22250')&&(enbid.length==6)){plmn='22288';} link_lte="https://lteitaly.it/internal/map.php#bts="+plmn+"."+enbid;$("#lteitaly").attr("href",link_lte);}});} function setgraph(p,val,min,max) {wwx=(val-min)/(max-min)*100;xs=String(wwx)+String.fromCharCode(37);e="#"+p+"b";$(e).width(xs);$(e).html(p+" : "+window[p]);if(wwx<50){$(e).css("background-color","yellow").css("color",'black')} else if(wwx>85){$(e).css("background-color","orange").css("color",'white')} else{$(e).css("background-color","green").css("color",'white')}} window.setInterval(gInfo,2500);function addBar() {$("body").prepend("<style> .val{color:red;font-weight:strong;} .p{border:1px solid #ccc;width:auto;height:20px;} .v{height:20px;} </style> <div class=\"p\"><div class=\"v\" id=\"rsrpb\"></div></div> <div class=\"p\"><div class=\"v\" id=\"rsrqb\"></div></div> <a style=\"font-size:1.4em;margin-right:30px;color:#04a;\" href=\"/index.html#settings/cellular\">BANDS</a> <div style=\"display:inline;\"> RSRP:<span class=\"val\" id=\"rsrp\">0</span>dBm RSRQ:<span class=\"val\" id=\"rsrq\">0</span>dB RSSI:<span class=\"val\" id=\"rssi\">0</span>dBm SINR:<span class=\"val\" id=\"sinr\">0</span>dB RQUALITY:<span class=\"val\" id=\"radioQuality\">0</span>dBm ENB ID:<a id=\"lteitaly\" target=\"lteitaly\" href\"#\"><span class=\"val\" style=\"font-weight:bold;text-decoration:underline;\" id=\"enbid\">0</span></a> CELL ID:<span class=\"val\" id=\"cellId\">0</span> BAND:<span class=\"val\" id=\"curBand\"></span>(+<span class=\"val\" id=\"SCCcount\"></span>CA) LTEMODE<span class=\"val\" id=\"connectionText\"></span><br /> TOTAL:<span class=\"val\" id=\"total\">0</span>  SESSION:<span class=\"val\" id=\"sessDuration\"></span>min   BATTERY:<span class=\"val\" id=\"battChargeLevel\"></span> CHARGE:<span class=\"val\" id=\"battChargeSource\"></span> </div>");}
Add Comment
Please, Sign In to add comment