-
Notifications
You must be signed in to change notification settings - Fork 5
/
pump-min.js
1 lines (1 loc) · 4.25 KB
/
pump-min.js
1
(function(a){function s(a,b){if(a.nodeName==="IMG"){u(a,b);return}a.nodeName==="SCRIPT"?v(a,b):w(a,b)}function t(a){d?a.removeNode():a&&a.parentNode&&a.parentNode.removeChild(a),a=undefined}function u(a,b){a.onload=a.onerror=function(){a.onload=a.onerror=null,t(a),b()}}function v(a,b){a.onload=a.onerror=a.onreadystatechange=function(){i.test(a.readyState)&&(a.onload=a.onerror=a.onreadystatechange=null,t(a),b())}}function w(a,b){C||D?setTimeout(function(){x(a,b)},1):a.onload=a.onerror=function(){a.onload=a.onerror=null,a=undefined,b()}}function x(a,b){var c;if(C)a.sheet&&(c=!0);else if(a.sheet)try{a.sheet.cssRules&&(c=!0)}catch(d){d.name==="NS_ERROR_DOM_SECURITY_ERR"&&(c=!0)}setTimeout(function(){c?b():x(a,b)},1)}function y(){}function z(){if(document.currentScript)return document.currentScript;if(document.attachEvent){if(k)return k;if(l&&l.readyState==="interactive")return l;var a=c.getElementsByTagName("script");for(var b=0;b<a.length;b++){var d=a[b];if(d.readyState==="interactive")return l=d,d}}else{var e;try{makeReferenceError}catch(f){e=f.stack}if(!e)return undefined;var f=e.indexOf(" at ")!==-1?" at ":"@";while(e.indexOf(f)!==-1)e=e.substring(e.indexOf(f)+f.length);e=e.replace(/:\d+:\d+$/ig,"");var a=document.getElementsByTagName("script");for(var b=a.length-1;b>-1;b--)if(a[b].src===e)return a[b]}}function A(){var a=z();return a?a.hasAttribute?a.src:a.getAttribute("src",4):""}function E(b){var c=!1,d=!0,e=a.document,f=e.documentElement,g=e.addEventListener?"addEventListener":"attachEvent",h=e.addEventListener?"removeEventListener":"detachEvent",i=e.addEventListener?"":"on",j=function(d){if(d.type=="readystatechange"&&e.readyState!="complete")return;(d.type=="load"?a:e)[h](i+d.type,j,!1),!c&&(c=!0)&&b.call(a,d.type||d)},k=function(){try{f.doScroll("left")}catch(a){setTimeout(k,50);return}j("poll")};if(e.readyState=="complete")b.call(a,"lazy");else{if(e.createEventObject&&f.doScroll){try{d=!a.frameElement}catch(l){}d&&k()}e[g](i+"DOMContentLoaded",j,!1),e[g](i+"readystatechange",j,!1),a[g](i+"load",j,!1)}}function F(){var a=0,b;if(H.length)for(;b=H[a++];)b()}var b=document,c=b.head||b.getElementsByTagName("head")[0]||b.documentElement,d=!1,e=c.getElementsByTagName("base")[0],f=/\.jpg|jpeg|png|gif|bmp(?:\?|$)/i,g=/\.css(?:\?|$)/i,h=/\.js(?:\?|$)/i,i=/loaded|complete|undefined/,j=b.createElement("script").async===!0||"MozAppearance"in b.documentElement.style||window.opera,k,l,m=Array.prototype,n=Object.prototype.toString,o=function(a){return n.call(a)==="[object Function]"},p=function(a){return n.call(a)==="[object String]"},q=function(a){return n.call(a)==="[object Array]"},r=function(a,b,d,i,j){var l=g.test(a),m=f.test(a),n=m?new Image:document.createElement(l?"link":"script");if(h.test(a)&&d){var p=o(d)?d(a):d;p&&(n.charset=p)}s(n,b||y);if(m){n.src=a;return}l?(n.rel="stylesheet",n.href=a):(n.async=i?"async":!1,n.type="text/"+(j||"javascript"),n.src=a),k=n,e?c.insertBefore(n,e):c.appendChild(n),k=null},B=navigator.userAgent,C=Number(B.replace(/.*AppleWebKit\/(\d+)\..*/,"$1"))<536,D=B.indexOf("Firefox")>0&&!("onload"in document.createElement("link")),G=[],H=[],I={},J={charset:"utf-8"},K=function(a,b){var c=arguments,d=G.length,e=d-1,f=G[e],g=J.charset,h=z(),i,j=function(a){if(d==0){a();return}if(A()){a();return}if(f){f.loaded?a():f.callChain.push(a);return}a()};if(!o(a)&&!p(a))return;if(o(a)){b=a,j(b);return}b||(b=y);if(c.length===1)return I[a]&&I[a].exports;I[a]={init:function(){var c=I[a].exports;return b(c),c},exports:{}},i=I[a].init,j(i)},L=function(b){var c=b.callChain,d=c.length;for(var e=0;e<d;e++)c[e].call(a);b.called=!0};K.sequentialExecute=function(a,b){var c,d=J.charset,e=function(){var a=G[c],b=G[++c];a.loaded=!0,L(a),b&&b.preloaded&&r(b.url,e,d)},f=function(){r(a,function(){var b=G[c],f=G[c-1];b.preloaded=!0,(c==0||f&&f.called)&&r(a,e,d)},J.charset,null,"cache")};G.push({url:a,callChain:[b],perloaded:!1,loaded:!1,called:!1}),c=G.length-1,j?r(a,function(){L(G[c])},J.charset):f()},K.nowExecute=function(a,b,c){r(a,b,J.charset,!0)},K.load=function(b,c,d){var e;return p(c)&&(d=c,c=y),arguments.length==1&&(c=y),d=h.test(b)?d||"sequential":"now",e=d+"Execute",K[e]&&K[e].call(a,b,c,J.charset)},K.ready=function(a,b){o(a)&&arguments.length==1&&(b=a),H.push(function(){K(a,b)})},K.clean=function(){G=[],I=[],H=[]},E(function(){F()}),K.modules=I,K.config=J,a.pump=K})(window);