📄 ig.js
字号:
" url";_gel("buttons").className+=" colored_background"}function _show_shared_userprefs_alert(){if(_gel("share_userprefs").checked){_gel("share_userprefs_alert").style.display="block";_gel("popup_iframe").contentWindow.shouldShareUserprefs(true)}else{_gel("share_userprefs_alert").style.display="none";_gel("popup_iframe").contentWindow.shouldShareUserprefs(false)}}function _get_userprefs_checkbox_html(a,b,c){var d=[];if(a&&a!=""){d.push('<div class="',c,'">');d.push('<input id="share_userprefs" type="checkbox"');if(b!=""){d.push(' onclick="_show_shared_userprefs_alert();"')}d.push("></input>");d.push('<label for="share_userprefs">',a,"</label>");if(b!=""){d.push('<div class="userprefs_alert"',' id="share_userprefs_alert">',b,"</div>")}d.push("</div>")}return d.join("")}function _modules_zipper(){if(_gel("module_list_zipper").className=="zipped_modules"){_gel("module_list_zipper").className="unzipped_modules";_gel("show_all_modules").style.display="none"}_ResizeIframeHeight()}function _find_unshared_gadgets(){var a=_gel("module_list").elements,b=[];for(var c=0;c<a.length;c++){if(!ig_4a(a[c])){b[b.length]=a[c].id.replace("share_","")}}return b}function ig_4a(a){if(a&&a.tagName=="INPUT"){var b=_gel("module_list_zipper"),c=b&&/unzipped_modules/.test(_gel("module_list_zipper").className),d=/extra_items/.test(a.parentNode.className),e=!b||c||!d;return a.checked&&e}return false}function _finish_sharing_gadget(a){if(a==_DI_button_type.OK){_gel("sent_content_msg").className="msg";_gel("sent_tab_box").className="hidden_msg_box";_gel("send_tab_error_box").className="hidden_msg_box";_gel("sent_gadget_box").className="msg_box"}}function _finish_sharing_tab(a){_gel("sent_content_msg").className="msg";_gel("sent_gadget_box").className="hidden_msg_box";if(a){_gel("sent_tab_box").className="msg_box";_gel("send_tab_error_box").className="hidden_msg_box"}else{_gel("send_tab_error_box").className="msg_box";_gel("sent_tab_box").className="hidden_msg_box"}};var ig_5=(function(){var a={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"boolean":function(c){return String(c)},number:function(c){return isFinite(c)?String(c):"null"},string:function(c){if(/["\\\x00-\x1f]/.test(c)){c=c.replace(/([\x00-\x1f\\"])/g,function(d,e){var f=a[e];if(f){return f}f=e.charCodeAt();return"\\u00"+Math.floor(f/16).toString(16)+(f%16).toString(16)})}return'"'+c+'"'},object:function(c){if(c){var d=[],e,f,g,h,i;if(c instanceof Array){d[0]="[";h=c.length;for(g=0;g<h;g+=1){i=c[g];f=b[typeof i];if(f){i=f(i);if(typeof i=="string"){if(e){d[d.length]=","}d[d.length]=i;e=true}}}d[d.length]="]"}else if(typeof c.hasOwnProperty==="function"){d[0]="{";for(g in c){if(c.hasOwnProperty(g)){i=c[g];f=b[typeof i];if(f){i=f(i);if(typeof i=="string"){if(e){d[d.length]=","}d.push(b.string(g),":",i);e=true}}}}d[d.length]="}"}else{return}return d.join("")}return"null"}};return{copyright:"(c)2005 JSON.org",license:"http://www.JSON.org/license.html",stringify:function(c){var d=b[typeof c];if(d){c=d(c);if(typeof c=="string"){return c}}return null},parse:function(c){try{return!/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(c.replace(/"(\\.|[^"\\])*"/g,""))&&eval("("+c+")")}catch(d){return false}}}})();function ig_5a(a){var b=document.createElement("DIV");b.innerHTML="<iframe onload='this.pool_locked=false'></iframe>";var c=b.getElementsByTagName("IFRAME")[0];c.style.visibility="hidden";c.style.width=(c.style.height="0px");c.style.border="0px";c.style.position="absolute";c.pool_locked=a;this.f[this.f.length]=c;b.removeChild(c);b=null;return c}function ig_6a(a){if(!a.match(/^http[s]?:\/\//)){return}var b=this;window.setTimeout(function(){var c=null;for(var d=b.f.length-1;d>=0;d--){var e=b.f[d];if(e&&!e.pool_locked){e.parentNode.removeChild(e);if(window.ActiveXObject){e=null;b.f[d]=null;b.f.splice(d,1)}else{e.pool_locked=true;c=e;break}}}c=c?c:b.Ba(true);c.src=a;document.body.appendChild(c)},0)}function ig_7a(){for(var a=0;a<this.f.length;a++){this.f[a].onload=null;this.f[a]=null}this.f.length=0;this.f=[]}function ig_8a(){this.f=[];this.Ba=ig_5a;this.iframe=ig_6a;this.clear=ig_7a}function ig_9a(a,b){_IFPC.z[a]=b}function ig_$a(a){delete _IFPC.z[a]}function ig_ab(a,b,c,d,e,f,g){c=c.slice(0);c.unshift(_IFPC.Ra(e));c.unshift(f);c.unshift(b);c.unshift(a);var h=4095-d.length;h=parseInt(h/3,10);if(typeof g=="undefined"){g=true}var i=_IFPC.ha(c),j=parseInt(i.length/h,10);if(i.length%h>0){j+=1}for(var k=0;k<j;k++){var m=i.substr(k*h,h),n=[a,_IFPC.ea,j,k,m,g];_IFPC.ja.iframe(d+"#"+_IFPC.ha(n))}_IFPC.ea++}function ig_bb(){_IFPC.z={};_IFPC.m={};_IFPC.ja.clear()}function ig_6(a){var b=_IFPC.P(a)[0],c=null;try{c=window.parent.frames[b]}catch(d){}try{if(!c&&window.parent.parent.frames[b]!=window.parent){c=window.parent.parent.frames[b]}}catch(d){}if(!c){c=window.parent.parent}var e=function(){c._IFPC.handleRequest(a)};if(window.ActiveXObject){e()}else{c.setTimeout(e,0)}}function ig_cb(a){var a=_IFPC.P(a),b=a.shift(),c=a.shift(),d=a.shift(),e=a.shift(),f=a.shift(),g=a.shift(),h=b+"_"+c;if(!_IFPC.k[h])_IFPC.k[h]=[];_IFPC.k[h].push([e,f]);if(_IFPC.k[h].length==d){_IFPC.k[h].sort(function(p,l){return parseInt(p[0],10)-parseInt(l[0],10)});f="";for(var i=0;i<d;i++){f+=_IFPC.k[h][i][1]}_IFPC.k[h]=null;var j=_IFPC.P(f),b=j.shift(),k=j.shift(),m=j.shift(),n=j.shift(),r=_IFPC.Ha(k);if(r){var o=r.apply(null,j);if(_IFPC.Ka(n)){o.unshift(n);_IFPC.call(b,_IFPC.aa,o,m,null,"")}}else if(g){throw new Error("Service "+k+" not registered.");}}}function ig_db(a){if(_IFPC.z.hasOwnProperty(a)){return _IFPC.z[a]}else{return null}}function ig_eb(a){var b="";if(a&&typeof a=="function"){b=_IFPC.Ga();_IFPC.m[b]=a}return b}function ig_fb(a){if(_IFPC.m.hasOwnProperty(a)){_IFPC.m[a]=null}}function ig_gb(a){if(a&&_IFPC.m.hasOwnProperty(a)){return _IFPC.m[a]}return null}function ig_hb(){return _IFPC.$+_IFPC.ya++}function ig_ib(a){return(a+"").indexOf(_IFPC.$)==0}function ig_jb(a){var b=a.split("&");for(var c=0;c<b.length;c++){var d=decodeURIComponent(b[c]);try{d=ig_5.parse(d)}catch(e){}b[c]=d}return b}function ig_kb(a){var b=[];for(var c=0;c<a.length;c++){var d=ig_5.stringify(a[c]);b.push(encodeURIComponent(d))}return b.join("&")}function ig_lb(a){var b=_IFPC.Ea(a);if(b){var c=[];for(var d=1;d<arguments.length;d++){c[c.length]=arguments[d]}b.apply(null,c);_IFPC.Va(a)}else{throw new Error("Invalid callbackId");}}var _IFPC={registerService:ig_9a,unregisterService:ig_$a,call:ig_ab,clear:ig_bb,relayRequest:ig_6,processRequest:ig_6,handleRequest:ig_cb,$:"cbid",aa:"ifpc_callback",ja:new ig_8a,k:{},z:{},m:{},ya:0,ea:0,Ha:ig_db,Ra:ig_eb,Va:ig_fb,Ea:ig_gb,Ga:ig_hb,Ka:ig_ib,P:ig_jb,ha:ig_kb,za:ig_lb};_IFPC.registerService(_IFPC.aa,_IFPC.za);var ig_7={obj:null,init:function(a,b){a.onmousedown=ig_7.start;a.obj=b;if(isNaN(parseInt(b.style.left,10)))b.style.left="0px";if(isNaN(parseInt(b.style.top,10)))b.style.top="0px";b.onDragStart=new Function;b.onDragEnd=new Function;b.onDrag=new Function},uninit:function(a,b){window.clearInterval(b.qa);a.onmousedown=null;a.obj=null;b.onDragStart=null;b.onDragEnd=null;b.onDrag=null},start:function(a){var b=ig_7.obj=this.obj;a=ig_7.fixE(a);if(a.which!=1){return true}b.onDragStart(a);var c=a.clientY;if(!ig_.la){c+=document.body.scrollTop}b.lastMouseX=a.clientX;b.lastMouseY=c;b.offsetMouseX=parseInt(b.style.left,10)-a.clientX;b.offsetMouseY=parseInt(b.style.top,10)-c;b.qa=window.setInterval(ig_mb(b,ig_nb()),10);document.onmouseup=ig_7.end;document.onmousemove=ig_7.drag;return false},drag:function(a){a=ig_7.fixE(a);if(a.which==0){return ig_7.end()}var b=ig_7.obj,c=a.clientY;if(!ig_.la){c+=document.body.scrollTop}var d=a.clientX;if(b.lastMouseX==d&&b.lastMouseY==c){return false}var e=d+b.offsetMouseX,f=c+b.offsetMouseY;b.style.left=e+"px";b.style.top=f+"px";b.lastMouseX=d;b.lastMouseY=c;b.onDrag(e,f);return false},end:function(a){a=ig_7.fixE(a);document.onmousemove=null;document.onmouseup=null;window.clearInterval(ig_7.obj.qa);var b=ig_7.obj.onDragEnd();ig_7.obj=null;return b},fixE:function(a){if(typeof a=="undefined")a=window.event;if(typeof a.layerX=="undefined")a.layerX=a.offsetX;if(typeof a.layerY=="undefined")a.layerY=a.offsetY;if(typeof a.which=="undefined")a.which=a.button;return a}};function ig_ob(a,b,c){if(!a){return[]}var d=b=="*"&&a.all?a.all:a.getElementsByTagName(b),e=[];c=c.replace(/\-/g,"\\-");var f=new RegExp("(^|\\s)"+c+"(\\s|$)"),g;for(var h=0;h<d.length;h++){g=d[h];if(f.test(g.className)){e.push(g)}}return e}var _IG_initDrag=function(a,b){ig_.A=a;ig_.u=b;ig_.o=ig_ob(ig_.A,"div","yui-u");if(_old_html){ig_.pa=ig_.A.tBodies[0].rows[0];ig_.o=ig_.pa.cells}ig_.g=[];var c=0;for(var d=0;d<ig_.o.length;d++){var e=ig_.o[d];if(e.className.indexOf("ig_dnd_fixed_col")!=-1||e.style.display=="none"){continue}for(var f=0;f<e.childNodes.length;f++){var g=e.childNodes[f];if(g.tagName=="DIV"){ig_.g[c]=g.className!="dm"?new ig_pb(g):new ig_qb(g);c++}}}_IG_AddEventHandler("unload",ig_8)};function ig_8(){for(var a=0;a<ig_.g.length;a++){ig_.g[a].ga();ig_.g[a]=null}ig_.g=null;ig_.o=null;if(_old_html){ig_.pa=null}ig_.A=null}var ig_={};ig_.Z=navigator.userAgent;ig_.La=ig_.Z.indexOf("Gecko")!=-1;ig_.ka=ig_.Z.indexOf("Opera")!=-1;ig_.la=ig_.Z.indexOf("Safari")!=-1;ig_.ca="IG_pageDivMaskId";ig_.ba="IG_moduleDivMaskId";ig_.Wa=function(){ig_.A.style.display="none"};ig_.Xa=function(){ig_.A.style.display=""};ig_.l=null;ig_.C=function(){if(!ig_.l){ig_.l=document.createElement("DIV");ig_.l.className="modbox";ig_.l.backgroundColor="";ig_.l.style.border="2px dashed #aaa";ig_.l.innerHTML=" "}return ig_.l};ig_.n=function(a,b){return function(){return a[b].apply(a,arguments)}};ig_.xa=function(){if(ig_.u){var a=ig_.u.getElementsByTagName("LI");if(_old_html){a=ig_.u.tBodies[0].rows[0].cells}for(var b=0;b<a.length;b++){var c=a[b];if(c.className.indexOf("unselectedtab")<0)continue;if(c.style.display=="none")continue;c.isDraggableTo=true;c.pagePosLeft=ig_.q(c,true);c.pagePosRight=c.pagePosLeft+c.offsetWidth;c.pagePosTop=ig_.q(c,false);c.pagePosBottom=c.pagePosTop+c.offsetHeight}}};ig_.wa=function(a){for(var b=0;b<ig_.g.length;b++){var c=ig_.g[b];c.a.pagePosLeft=ig_.q(c.a,true);c.a.pagePosTop=ig_.q(c.a,false)}var d=a.a.nextSibling;while(d){d.pagePosTop-=a.a.offsetHeight;d=d.nextSibling}};ig_.q=function(a,b){var c=0,d=0;if(a&&a.offsetParent&&a.offsetParent.id){if(!b){var e=a.offsetParent.getElementsByTagName(a.tagName);if(e&&e[0]){d=e[0].offsetTop}}}while(a){c+=a["offset"+(b?"Left":"Top")];a=a.offsetParent}return c-d};ig_.va=function(a){ig_.oa();var b=document.createElement("DIV");b.id=ig_.ca;b.innerHTML=" ";b.style.position="absolute";b.style.width="100%";b.style.height=document.body.offsetHeight+"px";b.style.left="0px";b.style.top="0px";b.style.backgroundImage="url(http://www.google.com/ig/images/cleardot.gif)";b.style.zIndex="9999";document.body.appendChild(b);if(a.Ia){b=b.cloneNode(true);b.id=ig_.ba;b.style.height=a.a.offsetHeight-a.h.offsetHeight+"px";b.style.top=a.h.offsetHeight+"px";a.a.appendChild(b)}};ig_.oa=function(){var a=[ig_.ba,ig_.ca];for(var b=0;b<a.length;b++){var c=_gel(a[b]);if(c){c.parentNode.removeChild(c);c=null}}};ig_.Sa=function(){var a="";for(var b=0;b<ig_.o.length;b++){var c=ig_.o[b];for(var d=0;d<c.childNodes.length-1;d++){var e=c.childNodes[d];if(e.tagName=="DIV"){a+=a!=""?":":"";a+=e.id.substring(2)+"_"+c.id.substring(2)}}}_xsetp("mp="+_esc(a))};function ig_qb(a){this.ga=ig_rb;this.a=a;this.a.innerHTML="<br />"}function ig_rb(){this.a=null}function ig_pb(a){this._urlMouseUp=ig_sb;this._urlMouseDown=ig_tb;this._urlClick=ig_ub;this._dragStart=ig_vb;this._drag=ig_wb;this._dragEnd=ig_xb;this.Da=ig_yb;this.J=ig_zb;this.ga=ig_Ab;this.v=false;this.a=a;this.h=_gel(a.id+"_h");this.d=_gel(a.id+"_url");this.Ia=this.a.getElementsByTagName("IFRAME").length>0;this.a.DND_Module=this;if(this.h){this.h.style.cursor="move";ig_7.init(this.h,this.a);this.a.onDragStart=ig_.n(this,"_dragStart");this.a.onDrag=ig_.n(this,"_drag");this.a.onDragEnd=ig_.n(this,"_dragEnd");if(this.d){this.d.style.cursor="pointer";if(ig_.La){this.d.onmousedown=ig_.n(this,"_urlMouseDown");this.d.onclick=ig_.n(this,"_urlClick")}else{this.d.onmouseup=ig_.n(this,"_urlMouseUp")}}}}function ig_Ab(){if(this.h){if(this.d){this.d.onclick=null;this.d.onmouseup=null;this.d=null}ig_7.uninit(this.h,this.a);this.a.onDragStart=null;this.a.onDrag=null;this.a.onDragEnd=null;this.h=null}this.a=null}function ig_sb(a){a=ig_7.fixE(a);if(this.v||!this.d||!this.d.href||a.which!=1){return true}this.J("titleclick");if(this.d.target||a.shiftKey){window.open(this.d.href,this.d.target)}else{document.location=this.d.href}return false}function ig_tb(a){a=ig_7.fixE(a);a.stopPropagation();return true}function ig_ub(a){if(!this.v&&this.d&&this.d.href){this.J("titleclick");return true}return false}function ig_vb(a){ig_.wa(this);ig_.xa();this.origNextSiblin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -