📄 ig.js
字号:
"none";d.style.left="0px";d.style.top="0px";var e=_gel("IG_PU_box"),f=_gel("IG_PU_iframe_cover");e.innerHTML=a;if(!ig_P&&c){var g=document.createElement("div");g.id="popup_box_placeholder";g.style.display="none";c.parentNode.insertBefore(g,c);_gel("dialogcontent").insertBefore(c,_gel("dialogcontent").firstChild)}e.style.position="absolute";e.style.zIndex=3001;f.style.position="absolute";e.style.visibility="hidden";e.style.display="block";ig_T();e.style.visibility="visible";f.style.display="";d.style.display="block";if(_gel("popup_iframe")){_IG_AddEventHandler("resize",_ResizeIframeHeight)}else{_IG_AddEventHandler("resize",ig_T)}window.onscroll=ig_T;var h=e.getElementsByTagName("input");if(h.length>0&&!h[0].disabled){h[0].focus()}}function _IG_PU_openURL(a,b,c,d,e,f){var g=[ig_M,'<div class="outerborder">'];g.push('<div class="border titlebar">');g.push(_IG_PU_createSimpleTitle(a));g.push(b);g.push("</div>");g.push('<div class="border body url">');g.push('<iframe id="popup_iframe" style="width:',d,';height:0px;"',' src="',c,'" onload="_ResizeIframeHeight();"',' scrolling="no" frameborder="0"></iframe>');g.push('<div class="c"></div>');if(e){g.push(ig_Q(e,"colored_background"))}g.push("</div></div>");g.push(ig_N);ig_R(g.join(""),f)}function ig_T(){var a=_gel("IG_PU_box"),b=_gel("IG_PU_iframe_cover"),c=_gel("IG_PU_bg"),d=document.body.clientWidth,e=window.innerHeight;if(!e){e=document.documentElement.offsetHeight}var f=a.offsetHeight<e;if(a){var g=(d-a.offsetWidth)/2,h=Math.max((e-a.offsetHeight)/2+ig_ja(),0);if(!f&&a.style.top){h=parseInt(a.style.top,10)}a.style.left=g+"px";a.style.top=h+"px";b.style.left=g+"px";b.style.top=h+"px";b.style.width=a.offsetWidth+"px";b.style.height=a.offsetHeight+"px"}if(c){var i=parseInt(a.style.top,10)+a.offsetHeight,j=Math.max(ig_w(),e,i);c.style.height=j+"px";c.style.width=document.body.clientWidth+"px"}}function _ResizeIframeHeight(){if(_gel("popup_iframe")){_gel("popup_iframe").style.height=ig_w(_gel("popup_iframe").contentWindow.document.body)+"px";_gel("popup_iframe").style.display="block";_gel("popup_iframe").style.display=""}ig_T()}function _IG_PU_hide(a){var b=_gel("button_"+a);if(b&&b.firstChild&&b.firstChild.disabled){return}var c=_gel("IG_PU_box"),d=_gel("IG_PU_iframe_cover"),e=_gel("IG_PU_bg");if(c){c.style.display="none";d.style.display="none"}if(e){e.onclick="";e.style.height="";e.style.width=""}if(!ig_P){var f=_gel("dialogcontent").firstChild;if(a!=_DI_button_type.OK&&f.nodeName=="FORM"){f.reset()}setTimeout("_IG_PU_move_DOM()",1000)}if(_gel("popup_iframe")){_IG_RemoveEventHandler("resize",_ResizeIframeHeight)}else{_IG_RemoveEventHandler("resize",ig_T)}window.onscroll=null;ig_O(a)}function _IG_PU_move_DOM(){var a=_gel("popup_box_placeholder"),b=_gel("dialogcontent").firstChild;a.parentNode.insertBefore(b,a);a.parentNode.removeChild(a)}function _IG_PU_IGNORE(){}function ig_S(a,b){if("opacity"in a.style){a.style.opacity=b?0.5:1}else if("MozOpacity"in a.style){a.style.MozOpacity=b?0.5:1}else if("filter"in a.style){a.style.filter=b?"alpha(opacity=50)":"alpha(opacity=100)"}}function _IG_PU_MakeDialogButton(a,b,c,d){var e=['<input type="button"'];if(b){e.push(' id="'+b+'"')}if(c){e.push(' class="'+c+'"')}if(d){e.push(' onclick="'+d+'"')}e.push(' value="',a,'"></input>');return e.join("")}function _IG_PU_disable_hide_for_button(a){var b=_gel("button_"+a);if(b){b.onclick=function(){}}}function _IG_PU_createSimpleTitle(a){var b=[];b.push('<div class="popup_title">',a,"</div>");b.push('<div class="popup_title_buttons">');b.push('<a onclick="_IG_PU_hide(_DI_button_type.Close);" class="delbox">');b.push("</a>");b.push("</div>");b.push('<div class="c"></div>');return b.join("")}function _IG_PU_createSimpleInputBox(a,b,c){var d=[];d.push('<div class="popup_body thinpadding">');d.push('<form onsubmit="_IG_PU_hide(_DI_button_type.OK); return false;">');d.push('<table cellspacing="0" cellpadding="0" border="0"><tr>');d.push('<td class="sidepadding">',_hesc(b),"</td>");d.push('<td class="sidepadding">');d.push('<input id="',_hesc(a),'" name="',_hesc(a),'" ');d.push('type="text" size="45" value="'+_hesc(c)+'">');d.push("</td>");d.push("</tr></table></form></div>");return d.join("")};var ig_U,ig_V,ig_W={};function ig_X(a){return ig_W[a]}function _IG_AddDropDownEventHandler(a,b){ig_W[a]=b}function _IG_DD_init(){document.write('<iframe id="IG_DD_iframe_cover" class="dd_iframe_cover" style="display:none;"></iframe>');document.write('<div id="IG_DD_div" class="dd_layer_hidden" onclick="_IG_DD_hide();return true;"></div>')}function _IG_DD_create(a,b){var c=document.createElement("div");c.setAttribute("id","DD_"+a);c.className="dd dd_border";c.style.display="none";c.onkeydown=_IG_DD_keys;var d="";for(var e=0,f;f=b[e];e++){d+=ig_Ya(f[0],f[1],f[2])}c.innerHTML=d;_gel("IG_DD_div").appendChild(c)}function ig_Ya(a,b,c){if(b==""){b="javascript:void(0)"}var d="<a class=dd_item href='"+b+"' onblur='IG_DD_restoreFocus=false; return true;' onmouseover='return _IG_DD_select(this);'";if(c){d+=" onclick='"+c+"; _IG_DD_hide(); return false;'"}d+=">"+a+"</div>";return d}function _IG_DD_open(a,b){var c=_gel("DD_"+b);if(c.style.display=="none"){ig_U=b;var d=_gel("IG_DD_div");d.className="dd_layer";_IG_AddEventHandler("resize",_IG_DD_position);_IG_DD_position();ig_V=false;if(c.hasChildNodes()){var e=c.childNodes[0];_IG_DD_select(e)}var f=ig_X(ig_U);if(f){f(true)}}}function _IG_DD_position(){var a=_gel("DD_"+ig_U),b=_gel("DD_tg_"+ig_U),c=_gel("IG_DD_div");a.style.display="block";var d=_findPos(b),e=a.offsetWidth,f=d[0]+b.offsetWidth/2-e/2,g=document.body.clientWidth+document.body.scrollLeft;if(f<5){f=5}else if(f+e>g-5){f=g-5-e}a.style.left=f+"px";a.style.top=d[1]+b.offsetHeight+"px";var h=_gel("IG_DD_iframe_cover");h.style.left=a.style.left;h.style.top=a.style.top;h.style.width=a.offsetWidth+"px";h.style.height=a.offsetHeight+"px";h.style.display="block";c.style.height=ig_w()+"px";c.style.width=document.body.clientWidth+"px"}function _IG_DD_hide(){var a=_gel("IG_DD_div");if(a.className=="dd_layer"){_IG_RemoveEventHandler("resize",_IG_DD_position);if(ig_U){var b=_gel("DD_"+ig_U);b.style.display="none";_gel("IG_DD_iframe_cover").style.display="none";var c=ig_X(ig_U);if(c){c(false)}if(ig_V){var d=_gel("DD_tg_"+ig_U);if(d){d.focus()}}ig_V=false;ig_U=null}a.className="dd_layer_hidden"}_IG_DD_select(null)}function _IG_DD_gcn(a,b,c){var d=new RegExp("(^| )"+c+"( |$)"),e=a.getElementsByTagName(b),f=[];for(var g=0,h;h=e[g];g++){if(d.test(h.className))f.push(h)}return f}function _IG_DD_select(a){var b=_IG_DD_gcn(_gel("IG_DD_div"),"a","dd_sel");if(b!=null){for(var c=0,d;d=b[c];c++){d.className=d.className.replace(/ dd_sel/g,"")}}if(a){a.className=a.className+" dd_sel";a.focus()}}function _IG_DD_keys(a){var b=true,c=_IG_DD_gcn(_gel("IG_DD_div"),"a","dd_sel");if(c==null||c.length!=1){return true}var d=c[0];if(!a){a=window.event}var e=a.keyCode||a.charCode||a.which;switch(e){case 13:ig_V=true;break;case 38:var f=d.previousSibling;if(f==null){var g=d.parentNode.childNodes;f=g[g.length-1]}_IG_DD_select(f);b=false;break;case 40:var f=d.nextSibling;if(f==null){var g=d.parentNode.childNodes;f=g[0]}_IG_DD_select(f);b=false;break;case 27:case 9:ig_V=true;b=ig_U==null&&e==9;_IG_DD_hide();break}return b};function ig_Za(a,b,c,d){if(!a){c(d?null:"")}var e=eval("("+a.substring(27)+")");if(b in e){var f=e[b].body;c(d?ig_Y(f):f)}}function ig__a(a){var b;if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async=false;b.validateOnParse=false;b.resolveExternals=false;b.loadXML(a)}else{var c=new DOMParser;b=c.parseFromString(a,"text/xml")}return b}function ig_Y(a){var b=ig__a(a),c=b.documentElement;if(c&&c.nodeName=="parsererror"||navigator.userAgent.indexOf("Safari")>=0&&b.getElementsByTagName("parsererror")[0]){return a}return b}var ig_0a=(new Date).getTime();function ig_Z(a){if(!a.post_data&&!a.headers&&window._pl_data&&_pl_data[a.url]&&!(!isNaN(a.refreshInterval)&&a.refreshInterval>=0&&(new Date).getTime()>ig_0a+a.refreshInterval*1000)){if(a.asXml){var b=ig_Y(_pl_data[a.url]);a.callback(b)}else{a.callback(_pl_data[a.url])}return}var c="/ig/jsonp?";if(_et!=""){c+="et="+_et+"&"}if(!isNaN(a.refreshInterval)&&a.refreshInterval>=0){c=_appendMaxAgeParameter(c,a.refreshInterval)}if(a.encoding){c+="enc="+_esc(a.encoding)+"&"}if(a.headers){var d=[];for(var e=0;e<a.headers.length;e++){d.push(_esc(a.headers[e][0]+":"+a.headers[e][1]))}c+="hdrs="+_esc(d.join(","))+"&"}c+="url="+_esc(a.url);_sendx(c,function(f){ig_Za(f,a.url,a.callback,a.asXml)},false,a.post_data)}function ig__(a){var b={};for(var c in a){b[c]=a[c]}return b}function _IG_FetchContent(a,b,c){var d;d=c!=null&&typeof c=="object"?ig__(c):{};d.url=a;d.callback=b;d.asXml=false;ig_Z(d)}function _IG_FetchXmlContent(a,b,c){var d;d=c!=null&&typeof c=="object"?ig__(c):{};d.url=a;d.callback=b;d.asXml=true;ig_Z(d)}function ig_1a(a,b,c){_IG_FetchContent(a,function(d){if(d){var e=ig_Y(d);if(typeof e=="object"&&e.firstChild){var f=e.firstChild;if(f.nodeType==7&&f.nodeName=="xml"){e.removeChild(f)}b(e);return}}b(null)},c)}function ig_0(a,b){var c="/ig/feedjson";_sendx(c,function(d){var e={};try{e=eval("("+d.slice(27)+")")}catch(f){e={}}for(var g in b){var h=e[g]?e[g]:null;b[g](h)}e=null;b=null},false,a)}var ig_1=false,ig_2a=0,ig_2="",ig_3={};function _IG_FetchFeedAsJSON(a,b,c,d,e){if(typeof e!="object"){e={}}var f="fr_"+ig_2a++,g="url="+_esc(a);if(!isNaN(e.refreshInterval)&&e.refreshInterval>=0){g=_appendMaxAgeParameter(g,e.refreshInterval)}if(c){g+="&val="+_esc(c)}if(d){g+="&sum=1"}var h=f+"="+_esc(g);if(ig_1){var i={};i[f]=b;ig_0(h,i)}else{if(ig_2!="")ig_2+="&";ig_2+=h;ig_3[f]=b}}function ig_3a(){ig_1=true;if(ig_2!=""){ig_0(ig_2,ig_3)}ig_2="";ig_3=null}_IG_AddEventHandler("domload",ig_3a);_exportSymbols("google.gadgets.Fetchers",["getContent",_IG_FetchContent,"getXMLContent",ig_1a,"getFeedAsJSON",_IG_FetchFeedAsJSON]);function _hide_sent_content_messages(){_gel("sent_content_msg").className="hidden_msg";_gel("sent_tab_box").className="hidden_msg_box";_gel("send_tab_error_box").className="hidden_msg_box";_gel("sent_gadget_box").className="hidden_msg_box"}var ig_4=null;function _share_gadget(a,b,c,d,e,f,g,h){if(d){_hide_sent_content_messages();if(!ig_4){ig_4=_gel("sent_gadget_box").innerHTML}_gel("sent_gadget_box").innerHTML=ig_4.replace("GADGET_NAME",_get_module_title(d))}if(g){var i="_gel('popup_iframe').contentWindow.prepareEmail(_gel('share_userprefs') ? _gel('share_userprefs').checked : false)"}else{var i="_gel('popup_iframe').contentWindow.prepareEmail();"}var j=['<input type="button" id="send_btn" disabled="true" onclick="'+i+'" value="'+e+'"></input>',_IG_PU_MakeDialogButton(f)],k="titlebar userprefs userprefs_border",m=_get_userprefs_checkbox_html(g,h,k);_IG_PU_openURL(a,m,b,c,j,d?_finish_sharing_gadget:null);_IG_PU_disable_hide_for_button(0)}function _share_this_gadget(a,b,c){if(c){_hide_sent_content_messages();if(!ig_4){ig_4=_gel("sent_gadget_box").innerHTML}_gel("sent_gadget_box").innerHTML=ig_4.replace("GADGET_NAME",_get_module_title(c))}var d=_gel("ext_css");if(d){var e="ext_css="+_esc(d.href);if(b.match("\\?")){b+="&"}else{b+="?"}b+=e}_IG_PU_openURL('<img src="/ig/images/sharegadget.gif"> '+a,null,b,"555px",null,c?_finish_sharing_gadget:null);_IG_PU_disable_hide_for_button(0)}function _share_tab_with_gadget_checkboxes(a,b,c,d,e,f,g){var h='<iframe id="popup_iframe" width="100%" height="0px" src="'+_hesc(b)+'" onload="_ResizeIframeHeight();" scrolling="no"></iframe>',i="_gel('popup_iframe').contentWindow.storeTabAndPrepareEmail(_find_unshared_gadgets(), _gel('share_userprefs') ? _gel('share_userprefs').checked : false);",j=['<input type="button" id="send_btn" disabled="true" onclick="'+_hesc(i)+'" value="'+_hesc(f)+'"></input>',_IG_PU_MakeDialogButton(g)];if(!_uli){_IG_PU_open(a,h,j);_gel("buttons").className+=" colored_background";return}var k=_get_all_modules(),m=Math.max(k.length*160,400),n=7,r=0;for(var o=0;o<k.length;o++){if(k[o].length>r){r=k[o].length}}var p=r>n&&c!="NO_TRANSLATION",l=[a];l.push('<form id="module_list">');l.push('<table class="titlebar module_list_table" ','cols="',k.length,'"',' width="',m,'px">');if(p){l.push('<tr class="zipped_modules" id="module_list_zipper">')}else{l.push('<tr class="unzipped_modules">')}for(var s=0;s<k.length;s++){l.push('<td width="',100/k.length,'%" ','valign="top">');for(var q=0;q<k[s].length;q++){var t=_hesc(k[s][q].id.replace("m_","")),v=_hesc(_get_module_title(k[s][q]));l.push('<div class="module_item');if(q>=n&&p){l.push(" extra_items")}l.push('">');l.push('<input id="share_',t,'" type="checkbox"'," checked ></input>");l.push('<label for="share_',t,'">',v,"</label>");l.push("</div>")}l.push("</td>")}l.push("</tr>");if(p){l.push('<tr class="zipped_module_list">');l.push('<td id="show_all_modules" colspan="',k.length,'" style="font-size:80%;text-align:center;">');l.push('<a href="javascript:void(0);" id="zipper_text"',' onclick="_modules_zipper();">');l.push(c,"</a>");l.push("</td></tr>")}l.push("</table>");l.push(_get_userprefs_checkbox_html(d,e,"userprefs"));l.push("</form>");_IG_PU_open(l.join(""),h,j);_IG_PU_disable_hide_for_button(0);_gel("dialogcontent").className+=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -