1jQuery(function($){ 2 let loading=false; 3 const grid=$('.sfag9v7-grid'); 4 if(!grid.length) return; 5 6 const loader=$('.sfag9v7-loader'); 7 const author=grid.data('author'); 8 let page=1; 9 10 function loadMore(){ 11 if(loading) return; 12 loading=true; 13 page++; 14 loader.show(); 15 $.ajax({ 16 url:sfag9v7_ajax.ajaxurl, 17 type:'POST', 18 data:{ 19 action:'sfag9v7_load_more', 20 page:page, 21 author_slug:author, 22 nonce:sfag9v7_ajax.nonce 23 }, 24 success:function(res){ 25 if($.trim(res)!=''){ 26 grid.append(res); 27 loading=false; 28 loader.hide(); 29 } else { 30 $(window).off('scroll',scrollHandler); 31 loader.hide(); 32 } 33 } 34 }); 35 } 36 37 function scrollHandler(){ 38 const scrollTop=$(window).scrollTop(); 39 const winHeight=$(window).height(); 40 const docHeight=$(document).height(); 41 if(scrollTop+winHeight+300>=docHeight){ 42 loadMore(); 43 } 44 } 45 46 $(window).on('scroll',scrollHandler); 47});
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.