vendor: 1,193 bytes, lines 1-53
1/*global jQuery */ 2/*! 3* SoloFolio Lazy Load JS 4* 5* By Luis Almeida 6* https://github.com/luis-almeida/unveil 7*/ 8;(function($) { 9 10 $.fn.unveil = function(threshold, callback) { 11 12 var $w = $(window), 13 th = threshold || 0, 14 retina = window.devicePixelRatio > 1, 15 attrib = retina? "data-src-retina" : "data-src", 16 images = this, 17 loaded; 18 19 this.one("unveil", function() { 20 var source = this.getAttribute(attrib); 21 source = source || this.getAttribute("data-src"); 22 if (source) { 23 this.setAttribute("src", source); 24 if (typeof callback === "function") callback.call(this); 25 } 26 }); 27 28 function unveil() { 29 var inview = images.filter(function() { 30 var $e = $(this); 31 if ($e.is(":hidden")) return; 32 33 var wt = $w.scrollTop(), 34 wb = wt + $w.height(), 35 et = $e.offset().top, 36 eb = et + $e.height(); 37 38 return eb >= wt - th && et <= wb + th; 39 }); 40 41 loaded = inview.trigger("unveil"); 42 images = images.not(loaded); 43 } 44 45 $w.on("scroll.unveil resize.unveil lookup.unveil", unveil); 46 47 unveil(); 48 49 return this; 50 51 }; 52 53})(window.jQuery);
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.