1/* global DATA */ 2 3/** 4 * ÐодгÑÑзка анонÑов 5 * 6 * 7 */ 8var inProgress = false; 9var is_loading = 0; // simple lock to prevent loading when loading 10var next_data_url = ''; // replaced when loading more 11var prev_data_cache; 12var last_scroll = 0; 13var existblock = false; 14 15$(document).ready(function () { 16 try { 17 if (DATA.handlerId == '148' || DATA.handlerId == '167' || DATA.handlerId == '169' || DATA.handlerId == '170' || DATA.handlerId == '281' || DATA.handlerId == '404' || DATA.handlerId == '587' || DATA.handlerId == '652') { 18 $('.block-footer__inner').hide(); 19 primeCache(); 20 window.setInterval(function () { // еÑли полÑзоваÑÐµÐ»Ñ Ð´Ð¾ÐºÑÑÑил до низа и некÑда болÑÑе кÑÑÑиÑÑ 21 onWindowScroll(); // подгÑÑжаем еÑÑ 22 }, 200); 23 $(window).scroll(onWindowScroll); 24 } 25 } catch (e) { 26 } 27}); 28 29 30 31function onWindowScroll() { 32 var scroll_pos = $(window).scrollTop(); 33 //console.log(scroll_pos, window.innerHeight, scroll_pos + $(window).height(), $(document).height()); 34 if (scroll_pos + window.innerHeight + 10 >= $(document).height() && !inProgress) { 35 loadFollowing(); 36 } 37 38} 39 40function loadFollowing() { 41 if (prev_data_cache) { 42 showFollowing(prev_data_cache); 43 } 44} 45function showFollowing(data) { 46 var l; 47 if ($('.block-publications__items').length > 0) { 48 l = $('.block-publications__items').last()[0]; 49 } else { 50 l = $('.list-articles-wide__items').last()[0]; 51 } 52 53 $(prev_data_cache).insertAfter(l); 54 55 prev_data_cache = false; 56 var url = $('.nextPageURL').last()[0].href; 57 $.ajax({ 58 type: "GET", 59 dataType: "html", 60 url: url + "?hour=" + Math.floor(Date.now() / 1000 / 60 / 60), 61 beforeSend: function () { 62 inProgress = true; 63 }, 64 success: function (data) { 65 prev_data_cache = data; 66 } 67 }).done(function () { 68 inProgress = false; 69 }); 70 71} 72 73function primeCache() { 74 75 $.ajax({ 76 type: "GET", 77 dataType: "html", 78 url: DATA.firstBackUrl + "?hour=" + Math.floor(Date.now() / 1000 / 60 / 60), 79 beforeSend: function () { 80 inProgress = true; 81 }, 82 success: function (data) { 83 prev_data_cache = data; 84 inProgress = false; 85 //console.log(firstPageURL, 'end'); 86 } 87 }).done(function () { 88 inProgress = false; 89 }); 90} 91
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.