Comparing version 1.0.7 to 1.0.8
@@ -1,2 +0,2 @@ | ||
/*! lozad.js - v1.0.7 - 2017-10-13 | ||
/*! lozad.js - v1.0.8 - 2017-10-13 | ||
* https://github.com/ApoorvSaxena/lozad.js | ||
@@ -24,4 +24,4 @@ * Copyright (c) 2017 Apoorv Saxena; Licensed MIT */ | ||
} | ||
if (element.getAttribute('data-backgroundImage')) { | ||
element.style.backgroundImage = 'url(' + element.getAttribute('data-backgroundImage') + ')'; | ||
if (element.getAttribute('data-background-image')) { | ||
element.style.backgroundImage = 'url(' + element.getAttribute('data-background-image') + ')'; | ||
} | ||
@@ -28,0 +28,0 @@ } |
@@ -1,4 +0,4 @@ | ||
/*! lozad.js - v1.0.7 - 2017-10-13 | ||
/*! lozad.js - v1.0.8 - 2017-10-13 | ||
* https://github.com/ApoorvSaxena/lozad.js | ||
* Copyright (c) 2017 Apoorv Saxena; Licensed MIT */ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lozad=e()}(this,function(){"use strict";function t(t){t.setAttribute("data-loaded",!0)}var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},r={rootMargin:"0px",threshold:0,load:function(t){t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&(t.srcset=t.getAttribute("data-srcset")),t.getAttribute("data-backgroundImage")&&(t.style.backgroundImage="url("+t.getAttribute("data-backgroundImage")+")")}},o=function(t){return"true"===t.getAttribute("data-loaded")},n=function(e){return function(r,n){r.forEach(function(r){r.intersectionRatio>0&&(n.unobserve(r.target),o(r.target)||(e(r.target),t(r.target)))})}};return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".lozad",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=e({},r,i),d=u.rootMargin,c=u.threshold,s=u.load,g=void 0;return window.IntersectionObserver&&(g=new IntersectionObserver(n(s),{rootMargin:d,threshold:c})),{observe:function(){for(var e=document.querySelectorAll(a),r=0;r<e.length;r++)o(e[r])||(g?g.observe(e[r]):(s(e[r]),t(e[r])))},triggerLoad:function(e){o(e)||(s(e),t(e))}}}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lozad=e()}(this,function(){"use strict";function t(t){t.setAttribute("data-loaded",!0)}var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},r={rootMargin:"0px",threshold:0,load:function(t){t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&(t.srcset=t.getAttribute("data-srcset")),t.getAttribute("data-background-image")&&(t.style.backgroundImage="url("+t.getAttribute("data-background-image")+")")}},o=function(t){return"true"===t.getAttribute("data-loaded")},n=function(e){return function(r,n){r.forEach(function(r){r.intersectionRatio>0&&(n.unobserve(r.target),o(r.target)||(e(r.target),t(r.target)))})}};return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".lozad",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=e({},r,i),d=u.rootMargin,c=u.threshold,s=u.load,g=void 0;return window.IntersectionObserver&&(g=new IntersectionObserver(n(s),{rootMargin:d,threshold:c})),{observe:function(){for(var e=document.querySelectorAll(a),r=0;r<e.length;r++)o(e[r])||(g?g.observe(e[r]):(s(e[r]),t(e[r])))},triggerLoad:function(e){o(e)||(s(e),t(e))}}}}); |
@@ -5,3 +5,3 @@ { | ||
"description": "A light-weight JS library to lazy load any HTML element such as images, ads, videos etc.", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"homepage": "https://github.com/ApoorvSaxena/lozad.js", | ||
@@ -8,0 +8,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12726