1$(document).ready(function () { 2 window.onbeforeunload = function () { 3 window.scrollTo(0, 0); 4 } 5 $.ajaxSetup({ 6 headers: { 7 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 8 } 9 }); 10 var scrollLimit = 50; // Amount after which ajax() call initializes 11 const lang = !$('html')[0].lang ? 'az' : $('html')[0].lang; 12 13 $(window).on('scroll', function () { 14 var scrollPosition = $(this).scrollTop(); 15 if (scrollPosition >= scrollLimit) { 16 if (scrollPosition >= 50 && scrollPosition < 1200) { 17 $('#apatvAndBlog').show() 18 // $.ajax({ 19 // url: `/${lang}/api/apa/apatvAndBlog`, type: 'GET', success: function (res) { 20 // $('#apatvAndBlog').html(res) 21 // } 22 // }); 23 scrollLimit = scrollLimit + 1150; 24 25 } else if (scrollPosition >= 1200 && scrollPosition < 2000) { 26 $('#editor').show() 27 // $.ajax({ 28 // url: `/${lang}/api/apa/editor`, type: 'GET', success: function (res) { 29 // $('#editor').html(res) 30 // } 31 // }); 32 scrollLimit = scrollLimit + 800; 33 34 } else if (scrollPosition >= 2000 && scrollPosition < 2800) { 35 $('#politicAndAnalysis').show() 36 // $.ajax({ 37 // url: `/${lang}/api/apa/politicAndAnalysis`, type: 'GET', success: function (res) { 38 // $('#politicAndAnalysis').html(res) 39 // } 40 // }); 41 scrollLimit = scrollLimit + 800; 42 43 } else if (scrollPosition >= 2800 && scrollPosition < 3800) { 44 $('#social').show() 45 // $.ajax({ 46 // url: `/${lang}/api/apa/social`, type: 'GET', success: function (res) { 47 // $('#social').html(res) 48 // } 49 // }); 50 scrollLimit = scrollLimit + 1000; 51 52 } else if (scrollPosition >= 3800 && scrollPosition < 4800) { 53 $('#economy').show() 54 // $.ajax({ 55 // url: `/${lang}/api/apa/economy`, type: 'GET', success: function (res) { 56 // $('#economy').html(res) 57 // } 58 // }); 59 60 scrollLimit = scrollLimit + 1000; 61 62 } else if (scrollPosition >= 4800 && scrollPosition < 5000) { 63 $('#world').show() 64 // $.ajax({ 65 // url: `/${lang}/api/apa/world`, type: 'GET', success: function (res) { 66 // $('#world').html(res) 67 // } 68 // }); 69 70 scrollLimit = scrollLimit + 200; 71 72 } 73 // Update values on each scroll 74 } 75 }); 76});
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.