g2_message_elements_zh_cn-29b48c0419eb88642212397a2cf99b0b.js
来自「Dm9000网络接口驱动大全」· JavaScript 代码 · 共 20 行
JS
20 行
/* Copyright 2007 Google Inc. */ (function() { var b=b||{};b.global=this;b.provide=function(a){var c=a.split("."),d=b.global;for(var e;e=c.shift();){if(d[e]){d=d[e]}else{d=(d[e]={})}}};b.getObjectByName=function(a){var c=a.split("."),d=b.global;for(var e;e=c.shift();){if(d[e]){d=d[e]}else{return null}}return d};b.globalize=function(a,c){b.mixin(c||b.global,a)};b.addDependency=function(a,c,d){};b.require=function(a){};b.addIncludeRoot=function(a,c){};b.basePath="";b.nullFunction=function(){};b.a={UNDEFINED:"undefined",NUMBER:"number",STRING:"string",BOOLEAN:"boolean",FUNCTION:"function",OBJECT:"object"};b.isDef=function(a){return typeof a!=b.a.UNDEFINED};b.isNull=function(a){return a===null};b.isArray=function(a){return a instanceof Array||b.isObject(a)&&typeof a.join==b.a.FUNCTION&&typeof a.reverse==b.a.FUNCTION};b.isArrayLike=function(a){return b.isObject(a)&&typeof a.length==b.a.NUMBER};b.isDateLike=function(a){return b.isObject(a)&&b.isFunction(a.getFullYear)};b.isString=function(a){return typeof a==b.a.STRING};b.isBoolean=function(a){return typeof a==b.a.BOOLEAN};b.isNumber=function(a){return typeof a==b.a.NUMBER};b.isFunction=function(a){return typeof a==b.a.FUNCTION};b.isObject=function(a){return a!=null&&typeof a==b.a.OBJECT};b.getHashCode=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(b.b)){return a[b.b]}if(!a[b.b]){a[b.b]=String(++b.f)}return a[b.b]};b.removeHashCode=function(a){if("removeAttribute"in a){a.removeAttribute(b.b)}try{delete a[b.b]}catch(c){}};b.b="closure_hashCode_";b.f=0;b.cloneObject=function(a){if(b.isObject(a)){if(a.clone){return a.clone()}var c=b.isArray(a)?[]:{};for(var d in a){c[d]=b.cloneObject(a[d])}return c}return a};b.bind=function(a,c){var d=a.e||[];d=d.concat(Array.prototype.slice.call(arguments,2));if(a.d){c=a.d}if(a.c){a=a.c}var e=function(){var g=d.concat(Array.prototype.slice.call(arguments));return a.apply(c,g)};e.e=d;e.d=c;e.c=a;return e};b.partial=function(a){return b.bind.apply(null,[a,null].concat(Array.prototype.slice.call(arguments,1)))};b.mixin=function(a,c){for(var d in c){a[d]=c[d]}};b.now=function(){return(new Date).getTime()};b.globalEval=function(a){if(b.global.execScript){b.global.execScript(a,"JavaScript")}else if(b.global.eval){b.global.eval(a)}else{throw Error("goog.globalEval not available");}};b.getMsg=function(a,c){var d=c||{};for(var e in d){a=a.replace(new RegExp("\\{\\$"+e+"\\}","gi"),d[e])}return a};b.exportSymbol=function(a,c){b.global[a]=c};b.exportProperty=function(a,c,d){a[c]=d};if(!Function.prototype.apply){Function.prototype.apply=function(a,c){var d=[],e,g;if(!a)a=b.global;if(!c)c=[];for(var h=0;h<c.length;h++){d[h]="args["+h+"]"}g="oScope.__applyTemp__.peek().("+d.join(",")+");";if(!a.__applyTemp__){a.__applyTemp__=[]}a.__applyTemp__.push(this);e=eval(g);a.__applyTemp__.pop();return e}}Function.prototype.bind=function(a){return b.bind.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.partial=function(){return b.bind.apply(null,[this,null].concat(Array.prototype.slice.call(arguments)))};Function.prototype.mixin=function(a){b.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 c=0;c<this.length-1;c++){this[c]=this[c+1]}this.length--}return a}}if(!Array.prototype.unshift){Array.prototype.unshift=function(){var a=arguments.length;for(var c=this.length-1;c>=0;c--){this[c+a]=this[c]}for(var d=0;d<a;d++){this[d]=arguments[d]}return this.length}};function H(a){if(a.readyState!=4)return;if(a.status!=200)return;var c=a.responseText;if(c.length<1)return;if(c[0]!=100||c.length!=3)return;var d="watch"+c[1]+"@"+c[2],e=window.document.getElementsByName(d),g=window.document.getElementsByName(d+"_img");for(var h=0;h<e.length;h++){e[h].setAttribute("value",0);g[h].src="/groups/img/watched_n.gif";e[h].blur()}}var t=["\u70b9\u51fb\u661f\u6807\u67e5\u770b\u4e3b\u9898","\u67e5\u770b\u6b64\u4e3b\u9898","\u70b9\u51fb\u4fe1\u5c01\u56fe\u6807\u63a5\u6536\u7535\u5b50\u90ae\u4ef6\u66f4\u65b0","\u901a\u8fc7\u7535\u5b50\u90ae\u4ef6\u63a5\u6536\u4e3b\u9898\u66f4\u65b0"];function z(a,c,d){this.id="rating_holder_"+a;this.rating=c;this.text=d}window.RAT_RatingHolder=z;var l=null;function w(){l=null;window.document.body.parentNode.onmouseup=null}function D(a,c,d){l=d;window.document.body.parentNode.onmouseup=w;s(a,c)}window.RAT_startTrackingStars=D;function B(a){if(window.is_ie&&l!=null&&a.button==0){w()}}window.RAT_mouseMove=B;function C(a,c,d,e,g){if(l!=null&&l==e){s(c,d);E(a,c,d,e,g);l=null}}window.RAT_mouseUpInStar=C;function E(a,c,d,e,g){window._SendServerRequest("/group/"+a+"/ratings?did="+c+"&rat="+d+"&tok="+g);e.rating=d;e.text="\u8bc4\u7ea7\u5df2\u4fdd\u5b58";var h=window.document.getElementById("ratings_text_"+c);h.innerHTML=e.text;if(e.text=="Text for clearing space"){h.style.display="none"}}function A(a,c,d){if(l!=null&&l!=d)return;if(l!=null&&l==d){s(a,c)}else{for(var e=1;e<=c;e++){window.document.getElementById("s"+e+"_"+a+"_img").src="/groups/img/yellow_star_lite.gif"}}var g=window.document.getElementById("ratings_text_"+a);g.style.display="inline";switch(c){case "1":g.innerHTML="\u5f88\u5dee\uff0c\u6211\u4e0d\u4f1a\u63a8\u8350\u6b64\u5e16";break;case "2":g.innerHTML="\u8f83\u5dee";break;case "3":g.innerHTML="\u4e00\u822c";break;case "4":g.innerHTML="\u8f83\u597d";break;case "5":g.innerHTML="\u771f\u68d2\uff01\u6211\u613f\u610f\u63a8\u8350\u6b64\u5e16";break;default:break}}window.RAT_hesitateStars=A;function F(a,c,d){s(a,d.rating);var e=window.document.getElementById("ratings_text_"+a);e.innerHTML=d.text;if(d.text=="Text for clearing space"){e.style.display="none"}}window.RAT_unhesStars=F;function s(a,c){for(var d=1;d<=5;d++){if(d<=c){window.document.getElementById("s"+d+"_"+a+"_img").src="/groups/img/yellow_star_blue_outline.gif"}else{window.document.getElementById("s"+d+"_"+a+"_img").src="/groups/img/clear_star_blue_outline.gif"}}}function I(a,c,d,e){var g="watch"+c+"@"+d,h=window.document.getElementsByName(g),m=window.document.getElementsByName(g+"_img"),k="threadsub"+c+"@"+d,j=window.document.getElementsByName(k),i=window.document.getElementsByName(k+"_img"),n=window.document.getElementsByName(k+"_lnk0"),p=window.document.getElementsByName(k+"_lnk2");if(h.length<1){return false}var q;try{q=parseInt(h[0].getAttribute("value"),10)}catch(o){q=1}if(j.length<1){if(e==2){return false}}var r;try{r=parseInt(j[0].getAttribute("value"),10)}catch(o){r=0}if(e==1){for(var f=0;f<h.length;f++){var u;if(q==0){u=1;h[f].setAttribute("value",1);m[f].src="/groups/img/watched_y.gif";m[f].title=t[1]}else{u=0;h[f].setAttribute("value",0);m[f].src="/groups/img/watched_n.gif";m[f].title=t[0]}h[f].blur()}}else{for(var f=0;f<j.length;f++){var v;if(r==0){v=1;j[f].setAttribute("value",1);if(i.length>f)i[f].src="/groups/img/threadsub_y.gif";if(i.length>f)i[f].title=t[3];if(n.length>f)n[f].style.display="";if(p.length>f)p[f].style.display="none"}else{v=0;j[f].setAttribute("value",0);if(i.length>f)i[f].src="/groups/img/threadsub_n.gif";if(i.legnth>f)i[f].title=t[2];if(n.length>f)n[f].style.display="none";if(p.length>f)p[f].style.display=""}j[f].blur()}}var x=2*r+q,y="/group/"+c+"/watch_topic?Action.JS=1&WebToken="+a+"&tid="+d+"&oldstate="+x+"&email="+(e==2?"1":"0");window._StartGETRequest(y,H);var o=window.is_ie?window.event:this;if(o){if(window.is_ie){o.cancelBubble=true;o.returnValue=false}}return false}window.toggleStar=I;function J(a,c,d,e){var g="watch"+d+"_"+e,h=window.document.getElementsByName(g),m=window.document.getElementsByName(g+"_img");if(h.length<1){return}var k;try{k=parseInt(h[0].getAttribute("value"),10)}catch(j){k=1}for(var i=0;i<h.length;i++){if(k==1){h[i].setAttribute("value",0);m[i].src="/groups/img/watched_n.gif"}else{h[i].setAttribute("value",1);m[i].src="/groups/img/watched_y.gif"}h[i].blur()}var n="/group/"+c+"/watch_topic?Action.JS=1&WebToken="+a+"&tid="+e+"&oldstate="+k+"&email=0";window._SendServerRequest(n);if(k==1){window._SendServerRequest("/groups/passive?WebToken="+a+"&Action.watch=1&q="+g+":off")}else{window._SendServerRequest("/groups/passive?WebToken="+a+"&Action.watch=1&q="+g+":on")}var j=window.is_ie?window.event:this;if(j){if(window.is_ie){j.cancelBubble=true;j.returnValue=false;return false}else{return false}}return false}window.toggle_watch=J;function G(a,c){var d="threadsub"+a+"@"+c,e=window.document.getElementsByName(d);if(e.length<1){return false}var g;try{g=parseInt(e[0].getAttribute("value"),10)}catch(h){return false}if(g){return true}else{return false}}window.TS_isThreadSubbed=G; })()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?