1/** 2 * lc-lazyload.js - (ES6 JS) Image preloader 3 * Version: v2.0.1 - 07-03-2021 4 * Author: Luca Montanari (LCweb) 5 * Website: https://lcweb.it 6 * Licensed under the MIT license 7 */ 8 9(function(){if("function"==typeof window.lc_lazyload)return!0;window.lc_lzl_cache={};var m={direct_array:!1,target_attr:"src",oneLoaded:null,allLoaded:null};window.lc_lazyload=function(h,b){if("object"!=typeof b)return console.error("LC lazyload","Options must be an object");b=Object.assign({},m,b);var n=function(a){if("string"!=typeof a)return a instanceof Element?[a]:Object.values(a);(a.match(/(#[0-9][^\s:,]*)/g)||[]).forEach(function(c){a=a.replace(c,'[id="'+c.replace("#","")+'"]')});return document.querySelectorAll(a)}, 10p=function(a){var c=[];a.forEach(function(d,q){d instanceof Element&&c.push(d)});return c},f=b.direct_array?h:p(n(h)),e=[],g=0,k=function(){g==f.length&&"function"==typeof b.allLoaded&&b.allLoaded.call(null,e)},l=function(a){if("undefined"!==typeof lc_lzl_cache[a])e[a]={w:lc_lzl_cache[a].w,h:lc_lzl_cache[a].h},g++,"function"==typeof b.oneLoaded&&b.oneLoaded.call(null,a,lc_lzl_cache[a].w,lc_lzl_cache[a].h),
10k();else{var c=new Image;c.src=a;c.onload=function(d){e[a]={w:d.target.width,h:d.target.height}; 11lc_lzl_cache[a]=e[a];g++;"function"==typeof b.oneLoaded&&b.oneLoaded.call(null,a,d.target.width,d.target.height);k()}}};(function(){b.direct_array?f.some(function(a,c){a?l(a):console.log("LC lazyload - empty img url - "+(c+1))}):f.forEach(function(a,c){var d=a.getAttribute(b.target_attr)?a.getAttribute(b.target_attr):!1;d?l(d):console.log("LC lazyload - empty img url - "+(c+1),"| targeted attribute: "+b.target_attr+" |",a)})})()}})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.