PageSourceSearch

https://xn--lngenfeld-v2a.at/components/com_bagallery/libraries/lazyload/jquery.lazyload.min.js?2.3.4

js xn--lngenfeld-v2a.at collected 2026-10-02 19:39:48 UTC 2,309 bytes, 65 lines download raw bytes

1/**
2* @package   BaGallery
3* @author    Balbooa http://www.balbooa.com/
4* @copyright Copyright @ Balbooa
5* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
6*/
7
8(function($){
9    $.fn.lazyload = function(options){
10        var $elem = this,
11            n = Math.floor(Math.random() * 999999999),
12            array = [],
13            wHeight = $(window).height(),
14            scrollElem = window,
15            target = $(window);
16        if (options.lightbox == 1) {
17            scrollElem = target = $(this).closest('.ba-gallery');
18        }
19        if (!$($elem[0]).attr('data-original')) {
20            return false;
21        }
22        $elem.each(function(ind, el){
23            array.push(el);
24        });
25        this.checkElements = function(){
26            var top = $(scrollElem).scrollTop() - wHeight,
27                bottom = top + wHeight * 3,
28                postArray = [];
29            if (options.lightbox == 1) {
30                top = 0 - wHeight;
31                bottom = top + wHeight * 3;
32            } else {
33                top = window.pageYOffset - wHeight;
34                bottom = top + wHeight * 3;
35            }
36            array.forEach(function(el, ind){
37                var obj = $(el),
38                    src = el.dataset.original,
39                    elemTop = Math.round(obj.offset().top),
40                    elemBottom = elemTop + (obj.height());
41                if (options.lightbox == 1) {
42                    elemTop = Math.round(obj.position().top);
43                    elemBottom = elemTop + (obj.height());
44                }
45                if (el.src.indexOf('default-lazy-load.webp') != -1 && elemTop < bottom && elemBottom > top
46                    && el.closest('.ba-gallery-items').style.display != 'none'){
47                    el.src = src;
48                } else {
49                    postArray.push(el);
50                }
51            });
52            array = postArray;
53            if (array.length == 0) {
54                target.off('scroll.lazyload-'+n);
55                $(window).off('resize.lazyload-'+n);
56            }
57        };
58        target.on("scroll.lazyload-"+n, this.checkElements);
59        $(window).on('resize.lazyload-'+n, function(e){
60            wHeight = e.currentTarget.innerHeight;
61        });
62        
63        return this;
64    };
65})(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.