From 9896992a904bc4f0e0e9462695a7e44dca0d791f Mon Sep 17 00:00:00 2001 From: aFarkas Date: Thu, 1 Jan 2015 18:03:19 +0100 Subject: [PATCH] 0.7.1 --- bower.json | 2 +- component.json | 2 +- lazysizes.js | 2 +- lazysizes.min.js | 4 ++-- package.json | 2 +- plugins/bgset/ls.bgset.min.js | 2 +- plugins/include/ls.include.min.js | 2 +- plugins/optimumx/ls.optimumx.min.js | 2 +- plugins/print/ls.print.min.js | 2 +- plugins/rias/ls.rias.min.js | 2 +- plugins/scrollintent/ls.scrollintent.min.js | 2 +- plugins/unveilhooks/ls.unveilhooks.min.js | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bower.json b/bower.json index a107a528..a5af4d11 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "lazysizes", "repo": "afarkas/lazysizes", - "version": "0.7.1-pre", + "version": "0.7.1", "main": "lazysizes.min.js", "scripts": [ "lazysizes.min.js" diff --git a/component.json b/component.json index 0e207df2..ed42317f 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "lazysizes", - "version": "0.7.1-pre", + "version": "0.7.1", "repo": "afarkas/lazysizes", "main": "lazysizes.min.js", "scripts": ["lazysizes.min.js"], diff --git a/lazysizes.js b/lazysizes.js index 690298d6..89866dd6 100644 --- a/lazysizes.js +++ b/lazysizes.js @@ -130,7 +130,7 @@ (eLright = rect.right) >= eLnegativeTreshhold && (eLleft = rect.left) <= eLvW && (eLbottom || eLright || eLleft || eLtop) && - ((!isWinloaded && isPreloading < 4) || getComputedStyle(lazyloadElems[globalLazyIndex], null).visibility != 'hidden')){ + ((isWinloaded && isPreloading < 3) || getComputedStyle(lazyloadElems[globalLazyIndex], null).visibility != 'hidden')){ unveilLazy(lazyloadElems[globalLazyIndex]); loadedSomething = true; } else { diff --git a/lazysizes.min.js b/lazysizes.min.js index 37997056..d3ae4ac8 100644 --- a/lazysizes.min.js +++ b/lazysizes.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ -!function(a){window.lazySizes=a(window),"function"==typeof define&&define.amd&&define(window.lazySizes)}(function(a){"use strict";function b(b,c){var d;a.HTMLPictureElement||(a.picturefill?picturefill({reevaluate:!0,reparse:!0,elements:[b]}):a.respimage?(c&&(d=b[respimage._.ns],d&&(d[c.srcset?"srcset":"src"]=void 0)),respimage({reparse:!0,elements:[b]})):c&&c.src&&(b.src=c.src))}function c(){m=0,clearTimeout(l)}function d(a,c){var d,e,g,h,j,k,l,m,p,q,r=C(a,"lazybeforeunveil",{force:!!c}),s=a.currentSrc||a.src;if(!r.defaultPrevented&&(t++,B(a,N,!0),clearTimeout(E),E=setTimeout(N,9999),j=a.getAttribute(i.sizesAttr)||a.getAttribute("sizes"),j&&("auto"==j?f(a,!0):a.setAttribute("sizes",j),i.clearAttr&&a.removeAttribute(i.sizesAttr)),l=a.getAttribute(i.srcsetAttr),k=a.getAttribute(i.srcAttr),(p=w.test(a.nodeName||""))&&(m=a.parentNode,q=v.test(m.nodeName||"")),i.addClasses&&(n(a,i.loadingClass),B(a,Q,!0)),l||k)){if(q)for(d=m.getElementsByTagName("source"),e=0,g=d.length;g>e;e++)h=d[e].getAttribute(i.srcsetAttr),h&&d[e].setAttribute("srcset",h);l?(a.setAttribute("srcset",l),u&&j&&a.removeAttribute("src"),i.clearAttr&&a.removeAttribute(i.srcsetAttr)):k&&(a.setAttribute("src",k),i.clearAttr&&a.removeAttribute(i.srcAttr))}setTimeout(function(){o(a,i.lazyClass),"auto"==j&&n(a,i.autosizesClass),(l||j)&&b(a,{srcset:l,src:k}),a.lazyload&&(a.lazyload=0),r.details.firesLoad||p&&(l||k)&&(!a.complete||s!=(a.currentSrc||a.src))||(i.addClasses&&Q({target:a}),B(a,N)),a=null},1)}function e(){k=0,clearTimeout(j)}function f(a,c){var d,e,f,g,h,j=a.parentNode;if(j&&(d=T(a,j),h=C(a,"lazybeforesizes",{width:d,dataAttr:!!c}),!h.defaultPrevented&&(d=h.details.width,d&&d!==a._lazysizesWidth&&(!i.onlyLargerSizes||!a._lazysizesWidth||a._lazysizesWidthf;f++)e[f].setAttribute("sizes",d);h.details.dataAttr||b(a)}}if(Date.now&&a.document.getElementsByClassName){var g,h,i,j,k,l,m,n,o,p,q,r=a.document,s=r.documentElement,t=0,u=a.HTMLPictureElement&&navigator.userAgent.match(/hrome\/(\d+)/)&&(40==RegExp.$1||41==RegExp.$1),v=/^picture$/i,w=/^img$/i,x=-21,y=x,z=9,A=0,B=function(a,b,c){var d=c?"addEventListener":"removeEventListener";c&&B(a,b),["load","error","lazyincluded"].forEach(function(c){a[d](c,b,!0)})},C=function(a,b,c){var d=r.createEvent("Event");return d.initEvent(b,!0,!0),d.details=c||{},a.dispatchEvent(d),d};n=function(a,b){p(a,b)||(a.className+=" "+b)},o=function(a,b){var c;(c=p(a,b))&&(a.className=a.className.replace(c," "))},p=function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");return a.className.match(c)&&c};var D,E,F,G,H,I,J,K,L,M=Date.now(),N=function(a){t--,a&&a.target&&B(a.target,N),(!a||0>t||!a.target)&&(t=0)},O=function(){var a,b,d=function(){b=!1},e=function(){clearTimeout(a),c(),P(),setTimeout(d,3)};return function(){b||(b=!0,clearTimeout(a),a=setTimeout(e,66))}}(),P=function(){var b,c,e;if(D=g.length,M=Date.now(),D){for(F=a.innerWidth+y,G=a.innerHeight+y,L=-1*y;D>m;m++)if(b=g[m].getBoundingClientRect(),(K=b.bottom)>=L&&(H=b.top)<=G&&(J=b.right)>=L&&(I=b.left)<=F&&(K||J||I||H)&&(!q&&4>t||"hidden"!=getComputedStyle(g[m],null).visibility))d(g[m]),e=!0;else{if(D-1>m&&Date.now()-M>9){c=!1,l=setTimeout(P);break}!e&&q&&!c&&i.preloadAfterLoad&&3>t&&(K||J||I||H||"auto"!=g[m].getAttribute(i.sizesAttr))&&(c=g[m])}A++,c&&!e&&d(c),z>y&&1>t&&!e&&A>9?(y=z,A=0,l=setTimeout(O,4)):y!=x&&(y=x)}},Q=function(a){n(a.target,i.loadedClass),o(a.target,i.loadingClass),B(a.target,Q)},R=function(){var a,b=function(){clearTimeout(a),e(),S()};return function(){clearTimeout(a),clearTimeout(j),a=setTimeout(b,99)}}(),S=function(){var a,b,c,d=h.length;if(d)for(b=Date.now(),c=k||0,a=c+3,e();d>c;c++)if(f(h[c]),c>a&&d-1>c&&Date.now()-b>9){k=c+1,j=setTimeout(S);break}},T=function(a,b){var c,d,e,f;for(a._lazysizesWidth||(f=a.getAttribute("alt"),a.alt=""),c=b.offsetWidth,d=a.offsetWidth,e=d>=c||d>i.minSize&&"block"==getComputedStyle(a,null).display?d:c;b&&b!=r.body&&ee;e++)h=d[e].getAttribute(i.srcsetAttr),h&&d[e].setAttribute("srcset",h);l?(a.setAttribute("srcset",l),u&&j&&a.removeAttribute("src"),i.clearAttr&&a.removeAttribute(i.srcsetAttr)):k&&(a.setAttribute("src",k),i.clearAttr&&a.removeAttribute(i.srcAttr))}setTimeout(function(){o(a,i.lazyClass),"auto"==j&&n(a,i.autosizesClass),(l||j)&&b(a,{srcset:l,src:k}),a.lazyload&&(a.lazyload=0),r.details.firesLoad||p&&(l||k)&&(!a.complete||s!=(a.currentSrc||a.src))||(i.addClasses&&Q({target:a}),B(a,N)),a=null},1)}function e(){k=0,clearTimeout(j)}function f(a,c){var d,e,f,g,h,j=a.parentNode;if(j&&(d=T(a,j),h=C(a,"lazybeforesizes",{width:d,dataAttr:!!c}),!h.defaultPrevented&&(d=h.details.width,d&&d!==a._lazysizesWidth&&(!i.onlyLargerSizes||!a._lazysizesWidth||a._lazysizesWidthf;f++)e[f].setAttribute("sizes",d);h.details.dataAttr||b(a)}}if(Date.now&&a.document.getElementsByClassName){var g,h,i,j,k,l,m,n,o,p,q,r=a.document,s=r.documentElement,t=0,u=a.HTMLPictureElement&&navigator.userAgent.match(/hrome\/(\d+)/)&&(40==RegExp.$1||41==RegExp.$1),v=/^picture$/i,w=/^img$/i,x=-21,y=x,z=9,A=0,B=function(a,b,c){var d=c?"addEventListener":"removeEventListener";c&&B(a,b),["load","error","lazyincluded"].forEach(function(c){a[d](c,b,!0)})},C=function(a,b,c){var d=r.createEvent("Event");return d.initEvent(b,!0,!0),d.details=c||{},a.dispatchEvent(d),d};n=function(a,b){p(a,b)||(a.className+=" "+b)},o=function(a,b){var c;(c=p(a,b))&&(a.className=a.className.replace(c," "))},p=function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");return a.className.match(c)&&c};var D,E,F,G,H,I,J,K,L,M=Date.now(),N=function(a){t--,a&&a.target&&B(a.target,N),(!a||0>t||!a.target)&&(t=0)},O=function(){var a,b,d=function(){b=!1},e=function(){clearTimeout(a),c(),P(),setTimeout(d,3)};return function(){b||(b=!0,clearTimeout(a),a=setTimeout(e,66))}}(),P=function(){var b,c,e;if(D=g.length,M=Date.now(),D){for(F=a.innerWidth+y,G=a.innerHeight+y,L=-1*y;D>m;m++)if(b=g[m].getBoundingClientRect(),(K=b.bottom)>=L&&(H=b.top)<=G&&(J=b.right)>=L&&(I=b.left)<=F&&(K||J||I||H)&&(q&&3>t||"hidden"!=getComputedStyle(g[m],null).visibility))d(g[m]),e=!0;else{if(D-1>m&&Date.now()-M>9){c=!1,l=setTimeout(P);break}!e&&q&&!c&&i.preloadAfterLoad&&3>t&&(K||J||I||H||"auto"!=g[m].getAttribute(i.sizesAttr))&&(c=g[m])}A++,c&&!e&&d(c),z>y&&1>t&&!e&&A>9?(y=z,A=0,l=setTimeout(O,4)):y!=x&&(y=x)}},Q=function(a){n(a.target,i.loadedClass),o(a.target,i.loadingClass),B(a.target,Q)},R=function(){var a,b=function(){clearTimeout(a),e(),S()};return function(){clearTimeout(a),clearTimeout(j),a=setTimeout(b,99)}}(),S=function(){var a,b,c,d=h.length;if(d)for(b=Date.now(),c=k||0,a=c+3,e();d>c;c++)if(f(h[c]),c>a&&d-1>c&&Date.now()-b>9){k=c+1,j=setTimeout(S);break}},T=function(a,b){var c,d,e,f;for(a._lazysizesWidth||(f=a.getAttribute("alt"),a.alt=""),c=b.offsetWidth,d=a.offsetWidth,e=d>=c||d>i.minSize&&"block"==getComputedStyle(a,null).display?d:c;b&&b!=r.body&&e", "repository": { diff --git a/plugins/bgset/ls.bgset.min.js b/plugins/bgset/ls.bgset.min.js index c5c23668..f61f594d 100644 --- a/plugins/bgset/ls.bgset.min.js +++ b/plugins/bgset/ls.bgset.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ addEventListener("lazybeforeunveil",function(){"use strict";var a=document.createElement("div");return function(b){var c,d,e,f;!b.defaultPrevented&&(c=b.target.getAttribute("data-bgset"))&&(d=document.createElement("img"),f=b.target.getAttribute("data-sizes"),d.setAttribute("sizes",f&&"auto"!=f?f:b.target.offsetWidth+"px"),e=function(){var c=d.currentSrc||d.src;c&&(b.target.style.backgroundImage="url("+c+")"),lazySizes.cfg.clearAttr&&b.target.removeAttribute("data-bgset"),d.removeEventListener("load",e),a.removeChild(d),d=null},d.addEventListener("load",e),d.setAttribute("srcset",c),a.appendChild(d),window.HTMLPictureElement||(window.respimage?respimage({elements:[d]}):window.picturefill&&picturefill({elements:[d]})),d.complete&&(d.src||d.currentSrc)&&e())}}()); \ No newline at end of file diff --git a/plugins/include/ls.include.min.js b/plugins/include/ls.include.min.js index c089de06..de9a9c77 100644 --- a/plugins/include/ls.include.min.js +++ b/plugins/include/ls.include.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a,b){"use strict";function c(a){a.match(z)?this.urls[RegExp.$1]=t.map[RegExp.$2]||RegExp.$2:this.urls.include=t.map[a]||a}function d(a){var b,d,e;return a=a.trim(),a=t.map[a]||a,d=a.match(A),d?(e=RegExp.$1,b={condition:s.include.conditions[RegExp.$3]||RegExp.$2||null,name:RegExp.$3}):(e=a,b={condition:null,name:""}),b.urls={},(t.map[e]||e).split(y).forEach(c,b),!b.urls.include&&b.urls.amd&&(this.saved=!0,b.initial=this),b}function e(a){var b,c,e=a.getAttribute("data-include")||"",f=a.lazyInclude;return f&&f.str==e||(c={saved:!1,content:null},f={str:e,candidates:(t.map[e]||e).split(w).map(d,c)},!(b=f.candidates.length)||f.candidates[b-1].condition?(c.saved=!0,f.candidates.push({urls:{},condition:null,name:"initial",content:c})):c.saved&&1==f.candidates.length&&(c.saved=!1),f.initialContent=c,c.saved&&(c.content=a.innerHTML),a.lazyInclude=f,f.candidates.length>1?lazySizes.aC(a,"lazyconditionalinclude"):lazySizes.rC(a,"lazyconditionalinclude")),f}function f(b,c){var d=!c.condition;return c.condition&&(g(),v[c.name]?d=!0:a.matchMedia&&"string"==typeof c.condition?d=(matchMedia(c.condition)||{}).matches:"function"==typeof c.condition&&(d=c.condition(b,c))),d}function g(){var a;v||(u||(u=b.querySelector(t.contentElement)),u?(a=(getComputedStyle(u,":after").getPropertyValue("content")||"none").replace(B,""),v={},a&&(v[a]=1),a=(getComputedStyle(u,":before").getPropertyValue("content")||"none").replace(B,""),a&&(v[a]=1)):v={})}function h(a){var b,c,d=a.lazyInclude;if(d&&d.candidates)for(b=0;b=200&&300>h||304===h:!0,oldCandidate:g,insert:!0,resetHTML:j},l={target:b,details:k};c.modules=f,g&&g.modules&&(g.modules.forEach(n,l),g.modules=null,k.resetHTML&&null==k.content&&c.initial&&c.initial.saved&&(k.content=c.initial.content)),f.forEach(m,l),d=lazySizes.fire(b,"lazyincludeloaded",k),k.insert&&k.isSuccess&&!d.defaultPrevented&&null!=k.content&&k.content!=b.innerHTML&&(a.jQuery?jQuery(b).html(k.content):b.innerHTML=k.content),E.d(),f.forEach(o,l),setTimeout(function(){lazySizes.fire(b,"lazyincluded",k)}),e=null,f=null},b.lazyInclude.current=c,b.setAttribute("data-currentinclude",c.name),c.urls.css&&l(c.urls.css),null==h.content&&c.urls.include?i(h,function(a){e=a,f&&d()}):e=h,c.urls.amd?j(c.urls.amd,function(a){f=a,e&&d()}):f=[],void(e&&f&&d()))}function q(a){var b,c=e(a);return c.candidates.length&&C.contains(a)?(b=h(a),b&&p(a,b),!0):void 0}function r(a){!a.defaultPrevented&&a.target.getAttribute("data-include")&&(E.q(a.target),a.details.firesLoad=!0)}if(b.getElementsByClassName){var s,t,u,v,w=/\s*,+\s+/,x={},y=/\s+/,z=/^(amd|css)\:(.+)/i,A=/(.+)\s+(\(\s*(.+)\s*\))/,B=/['"]/g,C=b.documentElement,D=b.getElementsByClassName("lazyconditionalinclude"),E=function(){var a=2,b=3,c=a,d=0,e=0,f=[],g=function(){var a,b=function(){f.length&&(d=0,f.d())};return function(){clearTimeout(a),a=setTimeout(b,999)}}();return{q:function(a){var h=null==a.getAttribute("data-lazyqueue");h&&(e++,c=b),d>c?f[h?"unshift":"push"](a):q(a)&&(d++,g())},d:function(){if(d&&d--,e>0&&(e--,e||(c=a)),!(d>c)){for(;f.length;)if(q(f.shift())){d++;break}g()}}}}(),F=function(){var a,b=function(){for(var a=0,b=D.length;b>a;a++)!lazySizes.hC(D[a],s.lazyClass)&&h(D[a])&&lazySizes.aC(D[a],s.lazyClass)};return function(c){clearTimeout(a),v=null,a=setTimeout(b,"resize"==c.type?31:0)}}();s=a.lazySizes&&lazySizes.cfg||a.lazySizesConfig,s||(s={},a.lazySizesConfig=s),s.include||(s.include={}),t=s.include,t.contentElement||(t.contentElement="html"),t.conditions||(t.conditions={}),t.map||(t.map={}),"preloadAfterLoad"in s||(s.preloadAfterLoad=!0),addEventListener("lazybeforeunveil",r,!1),addEventListener("resize",F,!1),addEventListener("lazyrefreshincludes",F,!1)}}(window,document); \ No newline at end of file diff --git a/plugins/optimumx/ls.optimumx.min.js b/plugins/optimumx/ls.optimumx.min.js index 608763a5..c3e92337 100644 --- a/plugins/optimumx/ls.optimumx.min.js +++ b/plugins/optimumx/ls.optimumx.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a,b,c){"use strict";function d(a,b){return a.w-b.w}function e(a){var b={url:a.url};return b[a.desc.type]=a.desc.val,b}function f(b){var c={srcset:b.getAttribute(lazySizes.cfg.srcsetAttr)}||"",f=a.respimage?respimage._.parseSet(c):a.parseSrcset(c.srcset);return b._lazyMaxDprSrcset=c,c.cands=f,f[0]&&f[0].desc&&(f=f.map(e),c.cands=f),c.index=0,c.dirty=!1,f[0]&&f[0].w?(f.sort(d),c.cSrcset=[f[0].url+" "+f[0].w+"w"]):(c.cSrcset=[],c.cands=[]),c}function g(a){var b,c,d,e=a.parentNode||{},g=f(a);if(g.isImg=!0,n.test(e.nodeName||""))for(g.picture=!0,b=e.getElementsByTagName("source"),c=0,d=b.length;d>c;c++)f(b[c]).isImg=!1;return g}function h(a,b,c){var d,e;return a&&a.w?a.w>c?!1:(d=1-a.w/c,e=b/c-1,0>e-d):!0}function i(a,b){var c,d,e;for(c=a.index+1;c=h.cands.length&&b.removeAttribute("data-optimumx")))}function k(a){var b=a.getAttribute("data-optimumx")||a.getAttribute("data-maxdpr");return b&&(b="auto"==b?l.getOptimumX(a):parseFloat(b,10)),b}var l,m,n=/^picture$/i;a.addEventListener&&a.devicePixelRatio&&(l=a.lazySizes&&lazySizes.cfg||a.lazySizesConfig,l||(l={},a.lazySizesConfig=l),"function"!=typeof l.getOptimumX&&(l.getOptimumX=function(){var b=a.devicePixelRatio;return b*=b>2.5?.7:b>1.9?.8:b>1.4?.9:.99,Math.round(100*b)/100}),m=function(){a.lazySizes&&!a.lazySizes.getOptimumX&&(a.lazySizes.getX=k)},addEventListener("lazybeforesizes",function(b){var c,d,e,f,h,i,l,m;if(!(!a.respimage&&!a.parseSrcset||b.defaultPrevented||!(c=k(b.target))||c>=a.devicePixelRatio||b.target._lazysizesWidth&&b.target._lazysizesWidth>b.details.width)&&(d=b.target._lazyMaxDprSrcset||g(b.target),e=b.details.width*c)){if(f=b.details.dataAttr?lazySizes.cfg.srcsetAttr:"srcset",d.picture&&(h=b.target.parentNode))for(i=h.getElementsByTagName("source"),l=0,m=i.length;m>l;l++)j(i[l],e,f);j(b.target,e,f)}},!1),m(),setTimeout(m))}(window,document); \ No newline at end of file diff --git a/plugins/print/ls.print.min.js b/plugins/print/ls.print.min.js index 36e8062f..aa57cf20 100644 --- a/plugins/print/ls.print.min.js +++ b/plugins/print/ls.print.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a){"use strict";var b,c,d,e;a.addEventListener&&(b=a.lazySizes&&lazySizes.cfg||a.lazySizesConfig||{},c=b.lazyClass||"lazyload",d=function(){var b,d;if("string"==typeof c&&(c=document.getElementsByClassName(c)),a.lazySizes)for(b=0,d=c.length;d>b;b++)lazySizes.unveilLazy(c[b])},addEventListener("beforeprint",d,!1),!("onbeforeprint"in a)&&a.matchMedia&&(e=matchMedia("print"))&&e.addListener&&e.addListener(function(){e.matches&&d()}))}(window); \ No newline at end of file diff --git a/plugins/rias/ls.rias.min.js b/plugins/rias/ls.rias.min.js index 75e9a5f9..2724aa8e 100644 --- a/plugins/rias/ls.rias.min.js +++ b/plugins/rias/ls.rias.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a,b){"use strict";function c(a,b){var c,d,e,f;d=a.parentNode,f={isPicture:!(!d||!l.test(d.nodeName||""))},e=function(b,c){var d=a.getAttribute("data-"+b);if(null!=d){if("true"==d)d=!0;else if("false"==d)d=!1;else if(k.test(d))d=parseFloat(d);else if("function"==typeof i[b])d=i[b](a,d);else if(o.test(d))try{d=JSON.parse(d)}catch(e){}f[b]=d}else b in i&&"function"!=typeof i[b]?f[b]=i[b]:c&&"function"==typeof i[b]&&(f[b]=i[b](a,d))};for(c in i)e(c);return b.replace(n,function(a,b){b in f||e(b,!0)}),f}function d(a,b){var c=[],d=function(a,c){return j[typeof b[c]]?b[c]:a};return c.srcset=[],b.absUrl&&(p.setAttribute("href",a),a=p.href),a=((b.prefix||"")+a+(b.postfix||"")).replace(n,d),b.widths.forEach(function(d){var e=a.replace(m,b.widthmap[d]||d);c.push({url:e,w:d}),c.srcset.push(e+" "+d+"w")}),c}function e(a,b,c){a&&(a=d(a,b),c.setAttribute(h.srcsetAttr,a.srcset.join(", ")),q(c,a))}function f(a,d){var e=c(a,d),f=b.createEvent("Event");return i.modifyOptions.call(a,{target:a,details:e}),f.initEvent("lazyriasmodifyoptions",!0,!1),f.details=e,a.dispatchEvent(f),e}function g(a){return a.getAttribute(a.getAttribute("data-srcattr")||i.srcAttr)||a.getAttribute(h.srcsetAttr)||a.getAttribute(h.srcAttr)||""}if(b.addEventListener){var h,i,j={string:1,number:1},k=/^\-*\+*\d+\.*\d*$/,l=/^picture$/i,m=/\s*\{\s*width\s*\}\s*/i,n=/\s*\{\s*([a-z0-9]+)\s*\}\s*/gi,o=/^\[.*\]|\{.*\}$/,p=b.createElement("a"),q=function(){var b=function(a,b,c,d){return Math.abs(b.w-d.w)b;)c+=10,c>60&&(c+=10),b=16*c,a.push(b)}(i.widths));for(b in d)b in i||(i[b]=d[b])}(),addEventListener("lazybeforeunveil",function(a){var b,c,d,j,k,l,n,o;if(!a.defaultPrevented&&(c=g(a.target))&&!i.disabled&&(a.target.getAttribute(h.sizesAttr)||a.getAttribute("sizes"))&&(b=a.target,d=f(b,c),m.test(c)||m.test(d.prefix)||m.test(d.postfix))){if(d.isPicture&&(j=b.parentNode))for(k=j.getElementsByTagName("source"),l=0,n=k.length;n>l;l++)o=g(k[l]),e(o,d,k[l]);e(c,d,b)}},!1)}}(window,document); \ No newline at end of file diff --git a/plugins/scrollintent/ls.scrollintent.min.js b/plugins/scrollintent/ls.scrollintent.min.js index 85b3911f..810ccbff 100644 --- a/plugins/scrollintent/ls.scrollintent.min.js +++ b/plugins/scrollintent/ls.scrollintent.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a,b){"use strict";var c;a.addEventListener&&(c=a.lazySizes&&lazySizes.cfg||a.lazySizesConfig,c||(c={},a.lazySizesConfig=c),c.scroll=!1,addEventListener("scroll",function(){var c,d,e,f,g,h=function(){var a=d.scrollTop||d.pageYOffset||0,b=d.scrollLeft||d.pageXOffset||0;d=null,Math.abs(f-a)<66&&Math.abs(g-b)<66&&i()},i=function(){a.lazySizes&&lazySizes.updateAllLazy(),clearTimeout(c),clearTimeout(e),d=null};return function(j){var k=j.target==b?a:j.target;clearTimeout(c),c=setTimeout(i,44),d?k!=d&&i():(d=k,f=d.scrollTop||d.pageYOffset||0,g=d.scrollLeft||d.pageXOffset||0,clearTimeout(e),e=setTimeout(h,99)),k=null}}(),!0))}(window,document); \ No newline at end of file diff --git a/plugins/unveilhooks/ls.unveilhooks.min.js b/plugins/unveilhooks/ls.unveilhooks.min.js index 04b6c38f..6daa82ea 100644 --- a/plugins/unveilhooks/ls.unveilhooks.min.js +++ b/plugins/unveilhooks/ls.unveilhooks.min.js @@ -1,3 +1,3 @@ -/*! lazysizes - v0.7.1-pre - 2015-01-01 +/*! lazysizes - v0.7.1 - 2015-01-01 Licensed MIT */ !function(a,b){"use strict";function c(a,c){if(!f[a]){var d=b.createElement(c?"link":"script"),e=b.getElementsByTagName("script")[0];c?(d.rel="stylesheet",d.href=a):d.src=a,f[a]=!0,f[d.src||d.href]=!0,e.parentNode.insertBefore(d,e)}}var d,e,f={};b.addEventListener&&a.getComputedStyle&&(d=a.lazySizes&&lazySizes.cfg||a.lazySizesConfig||{},e=function(a,c){var d=b.createElement("img");d.onload=function(){d.onload=null,d=null,c()},d.src=a,d&&d.complete&&d.onload&&d.onload()},addEventListener("lazybeforeunveil",function(b){var f,g,h;b.defaultPrevented||("none"==b.target.preload&&(b.target.preload="auto",b.preventDefault()),f=b.target.getAttribute("data-link"),f&&(c(f,!0),d.clearAttr&&b.target.removeAttribute("data-link")),f=b.target.getAttribute("data-bg"),f&&(g=getComputedStyle(b.target).getPropertyValue("backgroundImage"),h=function(){b.target.style.backgroundImage="url("+f+")"},g&&"none"!=g?e(f,h):h(),d.clearAttr&&b.target.removeAttribute("data-bg")),f=b.target.getAttribute("data-poster"),f&&(h=function(){b.target.poster=f},b.target.getAttribute("poster")?e(f,h):h(),d.clearAttr&&b.target.removeAttribute("data-poster")),f=b.target.getAttribute("data-script"),f&&(c(f),d.clearAttr&&b.target.removeAttribute("data-script")),f=b.target.getAttribute("data-require"),f&&(a.require&&require([f]),d.clearAttr&&b.target.removeAttribute("data-require")))},!1))}(window,document); \ No newline at end of file