⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 g2_common-a7f65112f2a0c67b34711662797f6887.js

📁 30分钟内让你明白正则表达式是什么
💻 JS
📖 第 1 页 / 共 2 页
字号:
/* Copyright 2008 Google Inc. */ (function() { ;;var c=false;function l(a){try{throw a;}catch(b){m(b)}}function m(a,b){var d="Javascript exception: "+(b?b:"")+" "+a;if(p())d+=" "+a.name+": "+a.message+" ("+a.number+")";var e="";if(typeof a=="string")e=a+"\n";else for(var f in a)try{e+=f+": "+a[f]+"\n"}catch(g){}e+=r(m.caller);s(d+"\n"+e,1)}var t=/function (\w+)/;function v(a){var b=t.exec(String(a));if(b)return b[1];return""}function r(a){try{if(!p()&&!(w("safari")||w("konqueror"))&&w("mozilla"))return Error().stack;if(!a)return"";var b="- "+v(a)+"(";for(var d=0;d<a.arguments.length;d++){if(d>0)b+=", ";var e=String(a.arguments[d]);if(e.length>40)e=e.substr(0,40)+"...";b+=e}b+=")\n";b+=r(a.caller);return b}catch(f){return"[Cannot get stack trace]: "+f+"\n"}}var x,y=null,z=false;function A(){if((y==null||y.closed)&&!z)try{z=true;y=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");y.blur();y.document.open();z=false;var a="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";B(a)}catch(b){}}function s(a,b){if(!c){if(typeof C!="undefined")C(D(a));return}try{var d=(new Date).getTime()-x,e="["+d+"] "+D(a).replace(/\n/g,"<br>")+"<br>";if(b==1){e="<font color=#ff0000><b>Error: "+e+"</b></font>";y.focus()}}catch(f){}B(e)}function B(a){if(!c)return;try{A();y.document.write(a);y.scrollTo(0,1000000)}catch(b){}};function w(a){if(a in E)return E[a];return E[a]=navigator.userAgent.toLowerCase().indexOf(a)!=-1}var E={};function p(){return w("msie")&&!window.opera}function aa(a){try{return a.parentNode}catch(b){return a}}function ba(a,b){do{if(a===b)return true;b=aa(b)}while(b&&b!==document.body);return false}function F(a,b){if(a==null||a.className==null)return false;if(a.className==b)return true;var d=a.className.split(" ");for(var e=0;e<d.length;e++)if(d[e]==b)return true;return false}function ca(a,b){if(F(a,b))return;a.className+=" "+b}function da(a,b){if(a.className==null)return;if(a.className==b){a.className="";return}var d=a.className.split(" "),e=[],f=false;for(var g=0;g<d.length;g++)if(d[g]!=b){if(d[g])e.push(d[g])}else f=true;if(f)a.className=e.join(" ")}function G(a){var b=a.offsetLeft;if(a.offsetParent!=null)b+=G(a.offsetParent);return b}function H(a){var b=a.offsetTop;if(a.offsetParent!=null)b+=H(a.offsetParent);return b}function ea(a){return G(a)+a.offsetWidth}function fa(a){return I(a,ga)}var ga={C:function(a){return a.document.body.clientWidth},D:function(a){return a.document.documentElement.clientWidth},u:function(a){return a.innerWidth}};function ha(a){return I(a,ia)}var ia={C:function(a){return a.document.body.clientHeight},D:function(a){return a.document.documentElement.clientHeight},u:function(a){return a.innerHeight}};function I(a,b){try{if(!window.opera&&"compatMode"in a.document&&a.document.compatMode=="CSS1Compat")return b.D(a);else if(p())return b.C(a)}catch(d){}return b.u(a)}var ja=/&/g,ka=/</g,la=/>/g;function D(a){if(!a)return"";return a.replace(ja,"&amp;").replace(ka,"&lt;").replace(la,"&gt;").replace(ma,"&quot;")}var ma=/\"/g;function na(a){return a.srcElement||a.target}function J(a){return typeof a!="undefined"}function oa(a){var b;if(a.keyCode)b=a.keyCode;else if(a.which)b=a.which;return b}function pa(a){return document.getElementById(a)}function qa(a){return document.all[a]}var ra=document.getElementById?pa:qa;function C(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var d=ra("log");if(d){var e="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>";d.innerHTML=e+d.innerHTML}else window.status=a};function K(){}K.raise=function(a){if(typeof Error!="undefined")throw new Error(a||"Assertion Failed");else throw a;};K.fail=function(a){a=a||"Assertion failed";if(!(typeof l=="undefined"))l(a+"\n");K.raise(a)};K.isTrue=function(a,b){if(!a){if(b===undefined)b="Assertion failed";K.fail(b)}};K.equals=function(a,b,d){if(a!=b){if(d===undefined)d="AS_Assert.equals failed: <"+a+"> != <"+b+">";K.fail(d)}};K.typeOf=function(a,b,d){if(typeof a==b)return;if(a||a=="")try{if(b==K.TYPE_MAP[typeof a]||a instanceofb)return}catch(e){}if(d===undefined){if(typeof b=="function"){var f=b.toString().match(/^\s*function\s+([^\s\{]+)/);if(f)b=f[1]}d="AS_Assert.typeOf failed: <"+a+"> not typeof "+b}K.fail(d)};K.TYPE_MAP={string:String,number:Number,"boolean":Boolean};K.numArgs=function(a,b){var d=K.numArgs.caller;if(d&&d.arguments.length!=a){if(b===undefined)b=d.name+" expected "+a+" arguments  but received "+d.arguments.length;K.fail(b)}};var sa=this;String.prototype.N=function(a){return this.indexOf(a)==0};String.prototype.v=function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a,b)==b};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.subs=function(){var a=this;for(var b=0;b<arguments.length;b++)a=a.replace(/\%s/,String(arguments[b]));return a};if(!Function.prototype.apply)Function.prototype.apply=function(a,b){var d=[],e,f;if(!a)a=sa;var g=b||[];for(var h=0;h<g.length;h++)d[h]="args["+h+"]";f="oScope.__applyTemp__.peek()("+d.join(",")+");";if(!a.__applyTemp__)a.__applyTemp__=[];a.__applyTemp__.push(this);e=eval(f);a.__applyTemp__.pop();return e};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(){if(!this.length)return;var 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(){if(this.length==0)return;var 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 d=0;d<a;d++)this[d]=arguments[d];return this.length};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){for(var d=0;d<this.length;d++)a.call(b,this[d],d,this)};function L(a,b){var d=a.k||[];d=d.concat(Array.prototype.slice.call(arguments,2));if(typeof a.e!="undefined")b=a.e;if(typeof a.d!="undefined")a=a.d;var e=function(){var f=d.concat(Array.prototype.slice.call(arguments));return a.apply(b,f)};e.k=d;e.e=b;e.d=a;return e}Function.prototype.bind=function(a){return L.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};Function.prototype.partial=function(){return L.apply(null,[this,null].concat(Array.prototype.slice.call(arguments)))};Function.prototype.inherits=function(a){var b=function(){};b.prototype=a.prototype;this.Y=a.prototype;this.prototype=new b};Function.prototype.mixin=function(a){for(var b in a)this.prototype[b]=a[b];if(typeof a.toString=="function"&&a.toString!=this.prototype.toString)this.prototype.toString=a.toString};Function.prototype.bind=function(a){if(typeof this!="function")throw new Error("Bind must be called as a method of a function object.");var b=this,d=Array.prototype.splice.call(arguments,1,arguments.length);return function(){var e=d.concat();for(var f=0;f<arguments.length;f++)e.push(arguments[f]);return b.apply(a,e)}};var M,N,O;(function(){var a={},b=0;function d(g){if(g.G==null)g.G=++b;return g.G}function e(g,h,k,j){var i=d(g),n=d(k);j=!(!j);var o=i+"_"+h+"_"+n+"_"+j;return o}M=function(g,h,k,j){var i=e(g,h,k,j);if(i in a)return i;var n=f.bind(null,i);a[i]={listener:k,proxy:n,event:h,node:g,useCapture:j};if(g.addEventListener)g.addEventListener(h,n,j);else if(g.attachEvent)g.attachEvent("on"+h,n);else throw new Error("Node {"+g+"} does not support event listeners.");return i};N=function(g,h,k,j){var i=e(g,h,k,j);return O(i)};O=function(g){if(!(g in a))return false;var h=a[g],k=h.proxy,j=h.event,i=h.node,n=h.useCapture;if(i.removeEventListener)i.removeEventListener(j,k,n);else if(i.detachEvent)i.detachEvent("on"+j,k);delete a[g];return true};function f(g){var h=Array.prototype.splice.call(arguments,1,arguments.length);return a[g].listener.apply(null,h)}})();;function P(a,b,d){this.t=b;if(d){this.c=[];for(var e=0;e<a.length;e++)this.c.push(d+a[e])}else this.c=a}P.prototype.load=function(a){this.K=a;this.z=0;var b=this.t.getElementsByTagName("head")[0];for(var d=0;d<this.c.length;d++){var e=this.t.createElement("script");e.type="text/javascript";if(p())e.onreadystatechange=this.m.bind(this,e);else e.onload=this.m.bind(this,e);e.src=this.c[d];b.appendChild(e)}};P.prototype.m=function(a){if(p()&&a.readyState!="complete")return;this.z++;if(this.z==this.c.length&&this.K)this.K()};var Q=Q||{};Q.global=this;Q.f=null;Q.provide=function(a){Q.w(a)};Q.w=function(a,b){var d=a.split("."),e=Q.global,f;if(!(d[0]in e)&&e.execScript)e.execScript("var "+d[0]);while(d.length&&(f=d.shift()))if(!d.length&&Q.isDef(b))e[f]=b;else e=e[f]?e[f]:(e[f]={})};Q.getObjectByName=function(a){var b=a.split("."),d=Q.global;for(var e;e=b.shift();)if(d[e])d=d[e];else return null;return d};Q.globalize=function(a,b){var d=b||Q.global;for(var e in a)d[e]=a[e]};Q.addDependency=function(){};Q.require=function(){};Q.useStrictRequires=false;Q.basePath="";Q.nullFunction=function(){};Q.identityFunction=function(){return arguments[0]};Q.abstractMethod=function(){throw Error("unimplemented abstract method");};Q.typeOf=function(a){var b=typeof a;if(b=="object")if(a){if(typeof a.length=="number"&&typeof a.splice!="undefined"&&!Q.L(a,"length"))return"array";if(typeof a.call!="undefined")return"function"}else return"null";else if(b=="function"&&typeof a.call=="undefined")return"object";return b};if(Object.prototype.propertyIsEnumerable)Q.L=function(a,b){return Object.prototype.propertyIsEnumerable.call(a,b)};else Q.L=function(a,b){if(b in a)for(var d in a)if(d==b&&Object.prototype.hasOwnProperty.call(a,b))return true;return false};Q.isDef=function(a){return typeof a!="undefined"};Q.isNull=function(a){return a===null};Q.isDefAndNotNull=function(a){return Q.isDef(a)&&!Q.isNull(a)};Q.isArray=function(a){return Q.typeOf(a)=="array"};Q.isArrayLike=function(a){var b=Q.typeOf(a);return b=="array"||b=="object"&&typeof a.length=="number"};Q.isDateLike=function(a){return Q.isObject(a)&&typeof a.getFullYear=="function"};Q.isString=function(a){return typeof a=="string"};Q.isBoolean=function(a){return typeof a=="boolean"};Q.isNumber=function(a){return typeof a=="number"};Q.isFunction=function(a){return Q.typeOf(a)=="function"};Q.isObject=function(a){var b=Q.typeOf(a);return b=="object"||b=="array"||b=="function"};Q.getHashCode=function(a){if(a.hasOwnProperty&&a.hasOwnProperty(Q.a))return a[Q.a];if(!a[Q.a])a[Q.a]=++Q.T;return a[Q.a]};Q.removeHashCode=function(a){if("removeAttribute"in a)a.removeAttribute(Q.a);try{delete a[Q.a]}catch(b){}};Q.a="closure_hashCode_";Q.T=0;Q.cloneObject=function(a){var b=Q.typeOf(a);if(b=="object"||b=="array"){if(a.clone)return a.clone();var d=b=="array"?[]:{};for(var e in a)d[e]=Q.cloneObject(a[e]);return d}return a};Q.bind=function(a,b){var d=a.k;if(arguments.length>2){var e=Array.prototype.slice.call(arguments,2);if(d)e.unshift.apply(e,d);d=e}b=a.e||b;a=a.d||a;var f,g=b||Q.global;f=d?function(){var h=Array.prototype.slice.call(arguments);h.unshift.apply(h,d);return a.apply(g,h)}:function(){return a.apply(g,arguments)};f.k=d;f.e=b;f.d=a;return f};Q.partial=function(a){var b=Array.prototype.slice.call(arguments,1);b.unshift(a,null);return Q.bind.apply(null,b)};Q.mixin=function(a,b){for(var d in b)a[d]=b[d]};Q.now=Date.now||function(){return(new Date).getTime()};Q.globalEval=function(a){if(Q.global.execScript)Q.global.execScript(a,"JavaScript");else if(Q.global.eval){if(Q.f==null){Q.global.eval("var _et_ = 1;");if(typeof Q.global._et_!="undefined"){delete Q.global._et_;Q.f=true}else Q.f=false}if(Q.f)Q.global.eval(a);else{var b=Q.global.document,d=b.createElement("script");d.type="text/javascript";d.defer=false;d.appendChild(b.createTextNode(a));b.body.appendChild(d);b.body.removeChild(d)}}else throw Error("goog.globalEval not available");};Q.getMsg=function(a,b){var d=b||{};for(var e in d)a=a.replace(new RegExp("\\{\\$"+e+"\\}","gi"),d[e]);return a};Q.exportSymbol=function(a,b){Q.w(a,b)};Q.exportProperty=function(a,b,d){a[b]=d};if(!Function.prototype.apply)Function.prototype.apply=function(a,b){var d=[],e,f;if(!a)a=Q.global;if(!b)b=[];for(var g=0;g<b.length;g++)d[g]="args["+g+"]";f="oScope.__applyTemp__.peek().("+d.join(",")+");";if(!a.__applyTemp__)a.__applyTemp__=[];a.__applyTemp__.push(this);e=eval(f);a.__applyTemp__.pop();return e};Function.prototype.bind=function(a){if(arguments.length>1){var b=Array.prototype.slice.call(arguments,1);b.unshift(this,a);return Q.bind.apply(null,b)}else return Q.bind(this,a)};Function.prototype.partial=function(){var a=Array.prototype.slice.call(arguments);a.unshift(this,null);return Q.bind.apply(null,a)};Function.prototype.inherits=function(a){Q.inherits(this,a)};Q.inherits=function(a,b){function d(){}d.prototype=b.prototype;a.Y=b.prototype;a.prototype=new d;a.prototype.constructor=a};Function.prototype.mixin=function(a){Q.mixin(this.prototype,a)};Q.net={};Q.net.cookies={};Q.net.cookies.MAX_COOKIE_LENGTH=3950;Q.net.cookies.i=/\s*;\s*/;Q.net.cookies.set=function(a,b,d,e,f){if(/[;=]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/;/.test(b))throw Error('Invalid cookie value "'+b+'"');if(!Q.isDef(d))d=-1;var g=f?";domain="+f:"",h=e?";path="+e:"",k;if(d<0)k="";else if(d==0){var j=new Date(1970,1,1);k=";expires="+j.toUTCString()}else{var i=new Date((new Date).getTime()+d*1000);k=";expires="+i.toUTCString()}document.cookie=a+"="+b+g+h+k};Q.net.cookies.get=function(a,b){var d=a+"=",e=String(document.cookie).split(Q.net.cookies.i);for(var f=0,g;g=e[f];f++)if(g.indexOf(d)==0)return g.substr(d.length);return b};Q.net.cookies.remove=function(a,b,d){var e=Q.net.cookies.containsKey(a);Q.net.cookies.set(a,"",0,b,d);return e};Q.net.cookies.h=function(){var a=String(document.cookie).split(Q.net.cookies.i),b=[],d=[],e,f;for(var g=0;f=a[g];g++){e=f.indexOf("=");if(e==-1){b.push("");d.push(f)}else{b.push(f.substring(0,e));d.push(f.substring(e+1))}}return{keys:b,values:d}};Q.net.cookies.getKeys=function(){return Q.net.cookies.h().keys};Q.net.cookies.getValues=function(){return Q.net.cookies.h().values};Q.net.cookies.isEmpty=function(){return document.cookie==""};Q.net.cookies.getCount=function(){var a=String(document.cookie);if(a=="")return 0;return a.split(Q.net.cookies.i).length};Q.net.cookies.containsKey=function(a){var b={};return Q.net.cookies.get(a,b)!==b};Q.net.cookies.containsValue=function(a){var b=Q.net.cookies.h().values;for(var d=

⌨️ 快捷键说明

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