-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdefender.js
More file actions
1 lines (1 loc) · 1.58 KB
/
defender.js
File metadata and controls
1 lines (1 loc) · 1.58 KB
1
!function(h,j,b,l,a,d){function k(f,c){d?l(f,c||32):a.push(f,c)}function g(m,f,o,c){return f&&j.getElementById(f)||(c=j.createElement(m||"SCRIPT"),f&&(c.id=f),o&&(c.onload=o),j.head.appendChild(c)),c||{}}d=/p/.test(j.readyState),h.addEventListener("on"+b in h?b:"load",function(){for(d=1;a[0];){k(a.shift(),a.shift())}}),k._=g,h.defer=k,h.deferscript=function(m,f,o,c){k(function(){g("",f,c).src=m},o)}}(this,document,"pageshow",setTimeout,[]),function(G,j){var C="IntersectionObserver",w="src",o="lazied",q="data-",k=q+o,B="load",f="forEach",z="getAttribute",r="setAttribute",E=Function(),D=G.defer||E,x=D._||E;function i(b,a){return[].slice.call((a||j).querySelectorAll(b))}function u(a){return function(h,b,l,d,m,g){D(function(p,e){function c(s){!1!==(d||E).call(s,s)&&((g||["srcset",w,"style"])[f](function(v,n){(n=s[z](q+v))&&s[r](v,n)}),i("SOURCE",s)[f](c),B in s&&s[B]()),s.className+=" "+(l||o)}e=C in G?(p=new G[C](function(n){n[f](function(v,s){v.isIntersecting&&(s=v.target)&&(p.unobserve(s),c(s))})},m)).observe.bind(p):c,i(h||a+"["+q+w+"]:not(["+k+"])")[f](function(n){n[z](k)||(n[r](k,a),e(n))})},b)}}function F(){D(function(b,h,a,g,c){b=i((a="[type=deferjs]")+":not("+(g="[async]")+")").concat(i(a+g)),function d(){if(0!=b){for(g in (a=b.shift()).parentNode.removeChild(a),a.removeAttribute("type"),h=x(a.nodeName),a){"string"==typeof(c=a[g])&&h[g]!=c&&(h[g]=c)}h[w]&&!h.hasAttribute("async")?h.onload=h.onerror=d:D(d,0.1)}}()},4)}F(),G.deferstyle=function(b,d,c,a){D(function(g){(g=x("LINK",d,a)).rel="stylesheet",g.href=b},c)},G.deferimg=u("IMG"),G.deferiframe=u("IFRAME"),D.all=F}(this,document);