Signin  Pricing  Examples  Support

Libraries > lazyload.1.0.4.min.js

lazyload.1.0.4.min.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE https://wpchannel.com/wp-content/plugins/wp-rocket/inc/front/js/lazyload.1.0.4.min.js


Libraries on wpchannel.com






Explore More


55582X1321530.skimlinks.js

55642X1322337.skimlinks.js

56205X1329855.skimlinks.js

56871X1338113.skimlinks.js

lazyload.1.0.4.min.js
				
(function(e,g){var d,h=g.documentElement,A=e.addEventListener,p=e.setTimeout,R=e.requestAnimationFrame||p,W=/^picture$/i,N=["load","error","lazyincluded","_lazyloaded"],H=function(a,c){return a.className.match(c)},B=function(a,c){H(a,c)||(a.className+=" "+c)},O=function(a,c){var d;if(d=H(a,c))a.className=a.className.replace(d," ")},C=function(a,c,d){var l=d?"addEventListener":"removeEventListener";d&&C(a,c);N.forEach(function(d){a[l](d,c)})},S=function(a,d,m,l,e){var k=g.createEvent("CustomEvent");
k.initCustomEvent(d,!l,!e,m);k.details=k.detail;a.dispatchEvent(k);return k},T=function(a,c){var m;e.HTMLPictureElement||((m=e.picturefill||e.respimage||d.pf)?m({reevaluate:!0,reparse:!0,elements:[a]}):c&&c.src&&(a.src=c.src))},E=function(a){a=g.querySelectorAll("[data-lazy-src]:not(.lazyload),[data-lazy-original]:not(.lazyload)");for(var c=0;c<a.length;c++)B(a[c],d.lazyClass)},X=function(a){var c,m=0,l=e.Date,g=function(){c=!1;m=l.now();a()},k=function(){p(g)},h=function(){R(k)};return function(a){if(!c){var e=
d.throttle-(l.now()-m);c=!0;4>e&&(e=4);!0===a?h():p(h,e)}}},M=function(){var a,c,m,l,D,k,v,w,x,y,z,I,P,M=/^img$/i,N=/^iframe$/i,Y="onscroll"in e&&!/glebot/.test(navigator.userAgent),F=0,n=0,u=0,J=function(b){u--;b&&b.target&&C(b.target,J);if(!b||0>u||!b.target)u=0},f=X(function(){var b,r,e,l,g,f,h,K,U;if((D=d.loadMode)&&8>u&&(b=a.length)){r=0;n++;F<P&&1>u&&4<n&&2<D?(F=P,n=0):F=F!=I&&1<D&&3<n?I:0;for(;r<b;r++)if(a[r]&&!a[r]._lazyRace)if(Y){(K=a[r].getAttribute("data-expand"))&&(f=1*K)||(f=F);U!==f&&
(k=innerWidth+f,v=innerHeight+f,h=-1*f,U=f);e=a[r].getBoundingClientRect();var q;if((q=(z=e.bottom)>=h&&(w=e.top)<=v&&(y=e.right)>=h&&(x=e.left)<=k&&(z||y||x||w))&&!(q=m&&3>u&&4>n&&!K&&2<D)){var t=a[r];q=f;var G=void 0,p=t,t="hidden"!=getComputedStyle(t,null).visibility;w-=q;z+=q;x-=q;for(y+=q;t&&(p=p.offsetParent);)(t=0<(getComputedStyle(p,null).opacity||1))&&"visible"!=getComputedStyle(p,null).overflow&&(G=p.getBoundingClientRect(),t=y>G.left&&x<G.right&&z>G.top-1&&w<G.bottom+1);q=t}q?(L(a[r],!1,
e.width),g=!0):!g&&m&&!l&&3>u&&4>n&&2<D&&(c[0]||d.preloadAfterLoad)&&(c[0]||!K&&(z||y||x||w))&&(l=c[0]||a[r])}else L(a[r]);l&&!g&&L(l)}}),Q=function(b){B(b.target,d.loadedClass);O(b.target,d.loadingClass);C(b.target,Q)},Z=function(){var b,a=[],d=function(){for(;a.length;)a.shift()();b=!1};return function(c){a.push(c);b||(b=!0,R(d))}}(),L=function(b,a,c){var e,f,g,h,k,n,q=b.currentSrc||b.src,t=M.test(b.nodeName);if(m||!t||!q||b.complete||H(b,d.errorClass))b._lazyRace=!0,u++,Z(function(){b._lazyRace&&
delete b._lazyRace;O(b,d.lazyClass);if(!(k=S(b,"lazybeforeunveil",{force:!!a})).defaultPrevented){f=b.getAttribute("data-lazy-srcset");e=b.getAttribute("data-lazy-src")||b.getAttribute("data-lazy-original");t&&(h=(g=b.parentNode)&&W.test(g.nodeName||""));n=k.detail.firesLoad||"src"in b&&(f||e||h);k={target:b};n&&(C(b,J,!0),clearTimeout(l),l=p(J,2500),B(b,d.loadingClass),C(b,Q,!0));f&&b.setAttribute("srcset",f);if(e)if(N.test(b.nodeName)){var c=e;b.getAttribute("src")!=c&&b.setAttribute("src",c)}else b.setAttribute("src",
e);h&&T(b,{src:e})}if(!n||b.complete&&q==(b.currentSrc||b.src))n?J(k):u--,Q(k)})},V=function(){var b,a=function(){d.loadMode=3;f()};m=!0;n+=8;d.loadMode=3;A("scroll",function(){3==d.loadMode&&(d.loadMode=2);clearTimeout(b);b=p(a,99)},!0)};return{_:function(){a=g.getElementsByClassName(d.lazyClass);c=g.getElementsByClassName(d.lazyClass+" "+d.preloadClass);I=d.expand;P=Math.round(I*d.expFactor);A("scroll",f,!0);A("resize",f,!0);e.MutationObserver?((new MutationObserver(E)).observe(h,{childList:!0,
subtree:!0,attributes:!0}),(new MutationObserver(f)).observe(h,{childList:!0,subtree:!0,attributes:!0})):(h.addEventListener("DOMNodeInserted",E,!0),h.addEventListener("DOMAttrModified",E,!0),setInterval(E,999),h.addEventListener("DOMNodeInserted",f,!0),h.addEventListener("DOMAttrModified",f,!0),setInterval(f,999));A("hashchange",E,!0);"focus mouseover click load transitionend animationend webkitAnimationEnd".split(" ").forEach(function(a){g.addEventListener(a,f,!0)});(m=/d$|^c/.test(g.readyState))?
V():(A("load",V),g.addEventListener("DOMContentLoaded",f));f(0<a.length)},checkElems:f,unveil:L}}(),v=function(){v.i||(v.i=!0,M._())};(function(){var a,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",init:!0,expFactor:2,expand:359,loadMode:2,throttle:99};d=e.lazyRocketsConfig||e.lazyRocketsConfig||{};for(a in c)a in d||(d[a]=c[a]);e.lazyRocketsConfig=d;p(function(){if(d.init){for(var a=g.querySelectorAll("[data-lazy-src],[data-lazy-original]"),
c=0;c<a.length;c++)B(a[c],d.lazyClass);v()}})})();return{cfg:d,loader:M,init:v,uP:T,aC:B,rC:O,hC:H,fire:S}})(window,document);


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z