Compare commits
2 Commits
43d4852129
...
e768162041
Author | SHA1 | Date |
---|---|---|
multiSnow | e768162041 | |
multiSnow | 982ca15d80 |
|
@ -29,6 +29,7 @@ function connect(){
|
|||
|
||||
let wss_scheme=document.getElementById('wss_scheme').checked===true?'wss://':'ws://';
|
||||
let url=[wss_scheme,nwshost.value,':',nwsport.value,'/jsonrpc'].join('');
|
||||
let autorefresh=undefined;
|
||||
|
||||
ws=new WebSocket(url);
|
||||
ws.onerror=function(message){
|
||||
|
|
|
@ -87,6 +87,10 @@ function opr_active(gid,dict){
|
|||
pausecanvas(pause_icon);
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
@ -140,6 +144,10 @@ function opr_stopped(gid,dict){
|
|||
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
@ -216,6 +224,10 @@ function opr_waiting(gid,dict){
|
|||
unpausecanvas(unpause_icon);
|
||||
removecanvas(remove_icon);
|
||||
optioncanvas(option_icon);
|
||||
}else{
|
||||
let rect=node.getBoundingClientRect();
|
||||
if(rect.top>window.innerHeight||rect.top+rect.height<0)
|
||||
return 0;
|
||||
};
|
||||
for(let n of node.getElementsByTagName('div')){
|
||||
if(n.id in dictmap){
|
||||
|
|
|
@ -89,13 +89,13 @@ function start_autorefresh(){
|
|||
'mainstopped':showstopped,
|
||||
'mainwaiting':showwaiting
|
||||
};
|
||||
let sidetags=document.getElementById('sidetags');
|
||||
let autorefresh=document.getElementById('autorefresh');
|
||||
return setInterval(function(){
|
||||
let showtagname=getattr(document.getElementById('sidetags'),'data-crtshow');
|
||||
getstat();
|
||||
if(document.getElementById('autorefresh').checked){
|
||||
if(showtagname in idfunc_dict){
|
||||
idfunc_dict[showtagname]();
|
||||
};
|
||||
if(autorefresh.checked){
|
||||
let func=idfunc_dict[getattr(sidetags,'data-crtshow')];
|
||||
if(!!func)func();
|
||||
};
|
||||
},500);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue