PageSourceSearch

https://squires.nz/wp-content/themes/toocheke/src/js/load-more.js?ver=1.0.10

js squires.nz collected 2026-10-10 00:39:53 UTC 1,417 bytes, 49 lines download raw bytes

1jQuery(function (jQuery) {
2
3	jQuery('#infinite-scroll').append('<span class="load-more"></span>');
4	var button = jQuery('#infinite-scroll .load-more');
5	var page = 2;
6	var loading = false;
7	var scrollHandling = {
8		allow: true,
9		reallow: function () {
10			scrollHandling.allow = true;
11		},
12		delay: 400 //(milliseconds) adjust to the highest acceptable value
13	};
14	if(jQuery(button).length){
15		jQuery(window).scroll(function () {
16	
17			if (!loading && scrollHandling.allow) {
18				scrollHandling.allow = false;
19				setTimeout(scrollHandling.reallow, scrollHandling.delay);
20				var offset = jQuery(button).offset().top - jQuery(window).scrollTop();
21				if (2000 > offset) {
22					jQuery('.load-more').before('<div id="loader-container"><div class="loader"></div></div>');
23					loading = true;
24					var data = {
25						action: 'toocheke_ajax_load_more',
26						page: page,
27						query: toochekeloadmore.query,
28					};
29					jQuery.post(toochekeloadmore.url, data, function (res) {
30						if (res.success) {
31							jQuery('#infinite-scroll').append(res.data);
32							jQuery('#infinite-scroll').append(button);
33							page = page + 1;
34							loading = false;						
35						} else {
36							// console.log(res);
37						}
38					}).fail(function (xhr, textStatus, e) {
39						// console.log(xhr.responseText);
40					});
41					jQuery("#loader-container").remove();
42	
43				}
44			}
45		});
46	}
47
48	
49});

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.