PageSourceSearch

https://www.lomado.de/templates/Snackys/js/snackys/listing.js?v=259444

js lomado.de collected 2026-10-04 16:55:14 UTC 5,761 bytes, 135 lines download raw bytes

1!function() {
2    "use strict";
3    !$.snackyList && ($.snackyList = {});
4    var e = function() {};
5    e.prototype = {
6        data: {
7            isLoading: !1,
8            endlessObserver: {}
9        },
10        constructor: e,
11        load: function() {
12			if($("body").attr('data-page') == 2 && $('div.endless-scrolling').length)
13			{
14				$(".pagination-ajax").closest(".row").hide(),
15				this.activePrev(),
16				this.activeNext(),
17				this.watchEndless()
18			}
19        },
20		amazonPayPal: function()
21		{
22			if (!(typeof window.amazon === 'undefined' || window.amazon === null)) {
23				window.lpa().initButtons();
24			}
25		},
26        rewatchEndless: function() {
27            $.snackyList.data.endlessObserver.disconnect(),
28            $.snackyList.addToObserver()
29        },
30        watchEndless: function() {
31			var that = this;
32			$('#view-next-click').click(function(){
33				//change id of current
34				$(this).attr("id","view-next");
35				that.watchEndless();
36			});
37            this.data.endlessObserver = new IntersectionObserver(function(e, t) {
38                if (0 == $.snackyList.data.isLoading)
39                    for (var a = 0; a < e.length; a++)
40                        if (e[a].isIntersecting)
41                            if ("view-next" == e[a].target.id) {
42                                $.snackyList.data.isLoading = !0;
43                                var i = $("#view-next").attr("data-url");
44                                "" != i && "false" != i ? ($("#view-next").parent().addClass("loading"),
45                                $.snackyList.loadArticles(i)) : $("#view-next").remove()
46                            } else
47                                "pagination-url" == e[a].target.className ? window.history.replaceState("endless", window.title, e[a].target.getAttribute("data-url")) : console.log("observer something crazy?")
48            }
49            ,{
50                rootMargin: "0px 0px 50px 0px",
51                threshold: 0
52            }),
53            this.addToObserver()
54        },
55        addToObserver: function() {
56            var e = document.getElementById("view-next");
57            e && $.snackyList.data.endlessObserver.observe(e);
58            var t = document.getElementsByClassName("pagination-url");
59            if (t)
60                for (var a = 0; a < t.length; a++)
61                    $.snackyList.data.endlessObserver.observe(t[a])
62        },
63        loadArticles: function(e, t) {
64            var a = e, url, html, that=this;
65            e && "" != e && $.ajax({
66                type: "POST",
67                url: e,
68                data: {
69                    isAjax: 1,
70                    paging: 1 == t ? "prev" : "next"
71                },
72                cache: !1
73            }).done(function(e) {
74				html = $(e);
75				url = $('#endless-url',html).html();
76				if(url) url = url.replaceAll('&amp;', '&');
77                1 == t ? ($("#view-prev").attr("data-url", $.trim(url)),
78                $("#view-prev").parent().after('<span class="pagination-url" data-url="' + a + '"></span>' + $('#p-l',html).html()))
79				: 
80				($("#view-next").attr("data-url", $.trim(url)),
81                $("#view-next").parent().before('<span class="pagination-url" data-url="' + a + '"></span>' + $('#p-l',html).html()));
82				
83                $.snackyList.activePrev(),
84                $.snackyList.activeNext(),
85                $.snackyList.data.isLoading = !1,
86                $(".endless-scrolling.loading").removeClass("loading"),
87                //sImages && sImages.rewatch(),
88                $.snackyList.rewatchEndless(),
89                "function" == typeof $.evo.article && ($.evo.article().onLoad(),
90                $.evo.article().register(),
91                addValidationListener()),
92                $("#p-l .exp a, #p-l a.img-w").off("click").on("click", function(e) {
93                    window.history.replaceState("endless", window.title, window.location.href + "#" + $(this).closest(".p-c").attr("id"))
94                });
95				that.amazonPayPal();
96            }).fail(function(e) {
97                console.log("error while loading articles")
98            })
99        },
100        activePrev: function() {
101            var e = $("#view-prev").attr("data-url");
102            "" != e && "false" != e || $("#view-prev").parent().remove(),
103            $("#view-prev").off("click"),
104            $("#view-prev").on("click", function() {
105                var e = $(this).attr("data-url");
106                "" != e && "false" != e ? ($(this).parent().addClass("loading"),
107                $.snackyList.loadArticles(e, !0)) : $(this).parent().remove()
108            })
109        },
110        activeNext: function() {
111            var e = $("#view-next").attr("data-url");
112            "" != e && "false" != e || $("#view-next").parent().remove(),
113            $("#view-next").off("click"),
114            $("#view-next").on("click", function() {
115                var e = $(this).attr("data-url");
116                "" != e && "false" != e ? ($(this).parent().addClass("loading"),
117                $.snackyList.loadArticles(e)) : $(this).parent().remove()
118            })
119        },
120        loadNextArticles: function() {
121            var e = $("#view-next").parent()[0];
122            if (e && 0 == $.snackyList.data.isLoading) {
123                var t = e.getBoundingClientRect();
124                if (t.top >= 0 && t.top <= $(window).height()) {
125                    $.snackyList.data.isLoading = !0;
126                    var a = $("#view-next").attr("data-url");
127                    "" != a && "false" != a ? ($("#view-next").parent().addClass("loading"),
128                    $.snackyList.loadArticles(a)) : $("#view-next").remove()
129                }
130            }
131        }
132    },
133    $.snackyList = new e,
134    $.snackyList.load()
135}(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.