1(function ($) { 2 $.fn.homelocalExplorerScroll = function () { 3 const debounce = (func, timeout = 300) => { 4 let timer; 5 return (...args) => { 6 clearTimeout(timer); 7 timer = setTimeout(() => { 8 func.apply(this, args); 9 }, timeout); 10 }; 11 }; 12 13 const $container = $(this); 14 15 const selector = { 16 moreBtn: ".hfse-properties-more-btn", 17 }; 18 19 const app = { 20 init: () => { 21 $(window).on( 22 "scroll", 23 debounce(function () { 24 $btn = $container.find(selector.moreBtn); 25 if ($btn.length === 0) { 26 return; 27 } 28 29 if ($container.hasClass("loading") || $btn.is(":disabled")) { 30 return; 31 } 32 33 const scrollTriggerDistance = 300; // px from bottom 34 const scrollTop = $(window).scrollTop(); 35 const docHeight = $(document).height(); 36 const winHeight = $(window).height(); 37 38 if (scrollTop + winHeight + scrollTriggerDistance >= docHeight) { 39 $btn.trigger("click"); 40 } 41 }, 200), 42 ); 43 }, 44 }; 45 46 return app; 47 }; 48})(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.