commonlogscripts.js
上传用户:q2283699q
上传日期:2022-05-17
资源大小:10704k
文件大小:4k
- zvsb=new Object();zvsb.Pane=function(wnl){this.bottomThreshold=50;this.scrollContainerId=wnl;};zvsb.Pane.prototype.resize=function(){var hcwb=document.getElementById(this.scrollContainerId);hcwb.style.height=(document.documentElement.clientHeight-225)+'px';hcwb=null;this.scrollToEnd();};zvsb.Pane.prototype.scrollToEnd=function(){var hcwb=document.getElementById(this.scrollContainerId);hcwb.scrollTop=hcwb.scrollHeight;hcwb=null;};zvsb.Pane.prototype.isScrollable=function(){var hcwb=document.getElementById(this.scrollContainerId);var yqlb=0;if(hcwb.scrollHeight>0)yqlb=hcwb.scrollHeight;else if(hcwb.offsetHeight>0)yqlb=hcwb.offsetHeight;var njpb=(yqlb-hcwb.scrollTop-((hcwb.style.pixelHeight)?hcwb.style.pixelHeight:hcwb.offsetHeight)<this.bottomThreshold);hcwb=null;return njpb;};var hqjb=undefined;var xhx=true;var srvb=true;var fbqb=true;function jsrb(pvy,rsm,pkwb){var wtm=document.getElementById(pvy);if((rsm!="")&&(hqjb=jlfb("GET",("/?Command="+rsm+"&ID="+pkwb))))hqjb.request();wtm.onmouseover=function(){document.onselectstart=null;document.getElementsByTagName('body')[0].style.MozUserSelect='text';pwv=document.getElementsByTagName('table');for(var wvf=0;wvf<pwv.length;wvf++){pwv[wvf].style.MozUserSelect='text';}};wtm.onmouseout=function(){document.onselectstart=function(){return(false);};document.getElementsByTagName('body')[0].style.MozUserSelect='none';pwv=document.getElementsByTagName('table');for(var wvf=0;wvf<pwv.length;wvf++){pwv[wvf].style.MozUserSelect='none';}};}function gfv(rsm,pkwb,yvb){var jvq=zxpb();jvq.open("GET",(dfmb+"XML/LogTemplate.xml?Command="+rsm+"&ID="+pkwb+znpb()),true);if(yvb!=undefined)jvq.onreadystatechange=yvb;jvq.send(null);return(jvq);}function ggx(qsd){var jsx=0;if(qsd.length>=4){if((qsd.charAt(0)=='[')&&(qsd.charAt(3)==']'))jsx=parseInt(qsd.substring(1,3));}return(jsx);}function xjh(tmh){var mqz="";switch(tmh){case 1:mqz="#009900;";break;case 2:mqz="#0000ff;";break;case 3:mqz="#ca6500;";break;case 4:mqz="#640986;";break;case 5:mqz="#fff;";break;case 6:mqz="#fff;";break;default:mqz="#000000;";}if((tmh>=10)&&(tmh<=19))mqz+="background:#e8e8e8";else if((tmh>=20)&&(tmh<=29))mqz+="background:#ffffd9";else if((tmh>=30)&&(tmh<=39))mqz+="background:#ff6600";else if((tmh>=40)&&(tmh<=49))mqz+="background:#afd9ee";else if(tmh==5)mqz+="background:#ff0000";else if(tmh==6)mqz+="background:#000000";else mqz+="background:#fff";return(mqz);}function kcmb(tmh){var mqz="#000000";if((tmh % 10)==0)mqz="#009900";mqz+=";background:#fff;";return(mqz);}function yfl(dlg,zlcb,chpb,nsz,zwp){var pnkb=0;var qqtb=false;if(dlg!=undefined){if(dlg.readyState==4){if(dlg.status==200){var wkz=(nsz!=undefined)?nsz:xjh;var xthb="";var wzk="";var gfhb=gsc(dlg.responseText);whp=gfhb.getElementsByTagName("line");if(xhx&&chpb=="log"){document.getElementById(chpb).innerHTML="";xhx=false;}if(srvb&&chpb=="SpyLog"){document.getElementById(chpb).innerHTML="";srvb=false;}if(fbqb&&chpb=="ChatLog"){document.getElementById(chpb).innerHTML="";fbqb=false;}for(var ndk=0;(ndk<whp.length);ndk++){qqtb=false;if(whp[ndk].length!=0){var qwk=gbpb(whp[ndk].childNodes[0].nodeValue);qwk=qwk.replace(new RegExp("%","g"),"%");xthb=kdf(qwk);if((ncb!="")&&(ncb!=undefined)){var yzfb=xthb.toLowerCase();if(yzfb.indexOf(ncb.toLowerCase())<0)qqtb=true;}if(!qqtb){wzk+="<div style='color:"+wkz(ggx(xthb))+";'>";if(zwp)xthb=xthb.substr(5);xthb=xthb.replace(" "," ");xthb=xthb.replace(" "," ");wzk+=xthb+"</div>";}}}wmg(zlcb,chpb,wzk);pnkb=1;}}else pnkb=2;}return(pnkb);}function wmg(zlcb,chpb,vnbb){var cbd=zlcb.isScrollable();if((vnbb.length>0)&&(document.getElementById(chpb)!=undefined))document.getElementById(chpb).innerHTML+=vnbb;if(cbd==true){zlcb.scrollToEnd();document.getElementById(zlcb.scrollContainerId).style.width="100%";}}function qfm(ndcb,jzvb){document.onselectstart=null;document.getElementsByTagName('body')[0].style.MozUserSelect='text';pwv=document.getElementsByTagName('table');for(var wvf=0;wvf<pwv.length;wvf++){pwv[wvf].style.MozUserSelect='text';}if(document.selection){var phb=document.body.createTextRange();phb.moveToElementText(document.getElementById(ndcb));phb.select();if(AW.ie&&jzvb)phb.execCommand("Copy");}else if(window.getSelection){var phb=document.createRange();phb.selectNode(document.getElementById(ndcb));window.getSelection().addRange(phb);}document.onselectstart=Function("return (false);");}function jxvb(chpb){document.getElementById(chpb).innerHTML="";}function wlm(){zqd.setChecked(true,false);qfm('log');}