g2_common-587d88294a967c0acb1bbe233d1fd552.js

来自「Dm9000网络接口驱动大全」· JavaScript 代码 · 共 33 行 · 第 1/2 页

JS
33
字号
e.isArray(a)?[]:{};for(var c in a){b[c]=e.cloneObject(a[c])}return b}return a};e.bind=function(a,b,c){var d=a.g||[];d=d.concat(Array.prototype.slice.call(arguments,2));if(a.d){b=a.d}if(a.c){a=a.c}var g=function(){var f=d.concat(Array.prototype.slice.call(arguments));return a.apply(b,f)};g.g=d;g.d=b;g.c=a;return g};e.partial=function(a){return e.bind.apply(null,[a,null].concat(Array.prototype.slice.call(arguments,1)))};e.mixin=function(a,b){for(var c in b){a[c]=b[c]}};e.now=function(){return(new Date).getTime()};e.globalEval=function(a){if(e.global.execScript){e.global.execScript(a,"JavaScript")}else if(e.global.eval){e.global.eval(a)}else{throw Error("goog.globalEval not available");}};e.getMsg=function(a,b){var c=b||{};for(var d in c){a=a.replace(new RegExp("\\{\\$"+d+"\\}","gi"),c[d])}return a};e.exportSymbol=function(a,b){e.global[a]=b};e.exportProperty=function(a,b,c){a[b]=c};if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[],d,g;if(!a)a=e.global;if(!b)b=[];for(var f=0;f<b.length;f++){c[f]="args["+f+"]"}g="oScope.__applyTemp__.peek().("+c.join(",")+");";if(!a.__applyTemp__){a.__applyTemp__=[]}a.__applyTemp__.push(this);d=eval(g);a.__applyTemp__.pop();return d}}Function.prototype.bind=function(a,b){return e.bind.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.partial=function(){return e.bind.apply(null,[this,null].concat(Array.prototype.slice.call(arguments)))};Function.prototype.inherits=function(a){function b(){}b.prototype=a.prototype;this.t=a.prototype;this.prototype=new b;this.prototype.constructor=this};Function.prototype.mixin=function(a){e.mixin(this.prototype,a)};if(!Array.prototype.push){Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}return this.length}}if(!Array.prototype.pop){Array.prototype.pop=function(){var a;if(this.length){a=this[this.length-1];this.length--}return a}}Array.prototype.peek=function(){return this[this.length-1]};if(!Array.prototype.shift){Array.prototype.shift=function(){var a;if(this.length){a=this[0];for(var b=0;b<this.length-1;b++){this[b]=this[b+1]}this.length--}return a}}if(!Array.prototype.unshift){Array.prototype.unshift=function(){var a=arguments.length;for(var b=this.length-1;b>=0;b--){this[b+a]=this[b]}for(var c=0;c<a;c++){this[c]=arguments[c]}return this.length}};e.net={};e.net.cookies={};e.net.cookies.set=function(a,b,c,d,g){if(/;=/g.test(a)){throw new Error('Invalid cookie name "'+a+'"');}if(/;/g.test(b)){throw new Error('Invalid cookie value "'+b+'"');}if(!e.isDef(c)){c=-1}var f=g?";domain="+g:"",h=d?";path="+d:"",j;if(c<0){j=""}else if(c==0){var k=new Date(1970,1,1);j=";expires="+k.toUTCString()}else{var i=new Date((new Date).getTime()+c*1000);j=";expires="+i.toUTCString()}document.cookie=a+"="+b+f+h+j};e.net.cookies.get=function(a,b){var c=a+"=",d=String(document.cookie);for(var g=-1;(g=d.indexOf(c,g+1))>=0;){var f=g;while(--f>=0){var h=d.charAt(f);if(h==";"){f=-1;break}}if(f==-1){var j=d.indexOf(";",g);if(j<0){j=d.length}return d.substring(g+c.length,j)}}return b};e.net.cookies.remove=function(a,b,c){var d=e.net.cookies.containsKey(a);e.net.cookies.set(a,"",0,b,c);return d};e.net.cookies.f=function(){var a=String(document.cookie),b=a.split(/\s*;\s*/),c=[],d=[],g,f;for(var h=0;f=b[h];h++){g=f.indexOf("=");if(g==-1){c.push("");d.push(f)}else{c.push(f.substring(0,g));d.push(f.substring(g+1))}}return{keys:c,values:d}};e.net.cookies.getKeys=function(){return e.net.cookies.f().keys};e.net.cookies.getValues=function(){return e.net.cookies.f().values};e.net.cookies.isEmpty=function(){return document.cookie==""};e.net.cookies.getCount=function(){var a=String(document.cookie),b=a.split(/\s*;\s*/);return b.length};e.net.cookies.containsKey=function(a){var b={};return e.net.cookies.get(a,b)!==b};e.net.cookies.containsValue=function(a){var b=e.net.cookies.f().values;for(var c=0;c<b.length;c++){if(b[c]==a){return true}}return false};e.net.cookies.clear=function(a){var b=e.net.cookies.f().keys;for(var c=b.length-1;c>=0;c--){e.net.cookies.remove(b[c])}};e.net.cookies.MAX_COOKIE_LENGTH=3950;e.userAgent={};(function(){var a=navigator.userAgent,b=typeof opera!="undefined",c=!b&&a.indexOf("MSIE")!=-1,d=!b&&a.indexOf("Safari")!=-1,g=!b&&navigator.product=="Gecko"&&!d,f=g&&navigator.vendor=="Camino",h=!b&&a.indexOf("Konqueror")!=-1,j=h||d,k,i;if(b){k=opera.version()}else{if(g){i=/rv\:([^\);]+)(\)|;)/}else if(c){i=/MSIE\s+([^\);]+)(\)|;)/}else if(d){i=/AppleWebKit\/(\S+)/}else if(h){i=/Konqueror\/([^\);]+)(\)|;)/}if(i){i.test(a);k=RegExp.$1}}var m=navigator.platform,v=m.indexOf("Mac")!=-1,ea=m.indexOf("Win")!=-1,fa=m.indexOf("Linux")!=-1;e.userAgent.OPERA=b;e.userAgent.IE=c;e.userAgent.GECKO=g;e.userAgent.CAMINO=f;e.userAgent.KONQUEROR=h;e.userAgent.SAFARI=d;e.userAgent.KHTML=j;e.userAgent.VERSION=k;e.userAgent.PLATFORM=navigator.platform;e.userAgent.MAC=v;e.userAgent.WINDOWS=ea;e.userAgent.LINUX=fa})();e.userAgent.compare=function(a,b){if(!isNaN(a)&&!isNaN(b)){return a-b}var c=a.split("."),d=b.split("."),g=Math.min(c.length,d.length);for(var f=0;f<g;f++){if(typeof d[f]=="undefined"){return 1}if(typeof c[f]=="undefined"){return-1}if(!isNaN(c[f])&&isNaN(d[f])&&c[f]==parseInt(d[f],10)){return 1}if(isNaN(c[f])&&!isNaN(d[f])&&parseInt(c[f],10)==d[f]){return-1}if(d[f]>c[f]){return-1}else if(d[f]<c[f]){return 1}}return 0};e.userAgent.isVersion=function(a){return e.userAgent.compare(e.userAgent.VERSION,a)>=0};function ja(){var a=e.userAgent.VERSION;return e.net.cookies.get("letmeinanyway")||e.userAgent.GECKO&&e.userAgent.compare(a,"1.8")>=0||e.userAgent.IE&&e.userAgent.compare(a,"6.0")>=0};function V(a){if(!p()){window.location="/group/<?cs var:CGI.Group.addr ?>/unsupported?url="+encodeURIComponent(window.location)}var b=document.getElementById("create_new_page_form");if(H(a)){var c=b.getElementsByTagName("input");for(var d=0;d<c.length;d++){if(c[d].name=="name"){c[d].value=a}}}b.submit()}window._G2_CreateNewPage=V;function p(){if(p.supported===undefined){p.supported=ja()}return p.supported}window._G2_IsSupportedEditBrowser=p;function X(a){if(!window.g2_modules){window.g2_modules=[]}var b=document.getElementById(a);window.g2_modules[a]=b;b.getChildElement=function(c){return document.getElementById(this.id+"_"+c)};return b}window._G2_RegisterModule=X;function W(a){if(window.g2_modules){return window.g2_modules[a]}}window._G2_GetModule=W;function w(a){var b=null;if(n()){var c=window.is_ie5?"Microsoft.XMLHTTP":"Msxml2.XMLHTTP";try{b=new ActiveXObject(c)}catch(d){alert("You need to enable active scripting and activeX controls")}}else{b=new XMLHttpRequest}b.onreadystatechange=function(){a(b)};return b}var M=(new Date).getTime();function J(){++M;return M}window._UniqueNum=J;function ha(a){I(a,function(){})}window._SendServerRequest=ha;function I(a,b){var c=w(b);c.open("GET",a+"&rand="+J(),true);c.send(null)}window._StartGETRequest=I;function ia(a,b,c){var d=w(c);d.open("POST",a,true);d.send(b)}window._StartPOSTRequest=ia;function U(a,b){if(n()){var c=document.getElementById(a),d=c.parentNode.parentNode,g=d.parentNode;g.style.height="100%";for(var f=0;f<d.rows.length;f++){d.rows[f].style.height="0px"}c.style.height="100%";r(window,"load",function(){d.style.position="absolute";d.style.height="0px";c.style.height="0px";var h="_G2_GetStarRowHeight_"+a,j="_G2_GetStarRowWidth_"+a;window[h]=function(){var k=d.parentNode.offsetHeight;for(var i=0;i<d.rows.length;i++){if(d.rows[i]!=c){k-=d.rows[i].offsetHeight}}return k-(b||0)};window[j]=function(){return d.parentNode.offsetWidth};c.style.setExpression("height",h+"()");c.style.setExpression("width",j+"()");r(window,"resize",function(){var k=window[h]();if(k>=0){c.style.height=k}var i=window[j]();if(i>=0){c.style.width=i}});document.recalc()})}}window._G2_AddStarRow=U;window.listen=r;window.unlisten=N;window.HasClass=F;window.AddClass=P;window.RemoveClass=ga;window.GetPageOffsetLeft=u;window.GetPageOffsetRight=$;window.GetPageOffsetTop=D;window.GetWindowHeight=ba;window.GetWindowWidth=ca;window.BR_IsIE=n;window.IsDescendant=da;window.IsDefined=H;window.GetEventTarget=Y;window.GetKeyCode=Z; })()

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?