1$(document).on('click','.searchForm button', function(){ 2 let data = $('.searchForm input')[0].value; 3 if (data.length < 3){ 4 $('.searchResult').html('ÐÐ°Ð¶Ð°Ð»Ñ Ð½ÐµÐ´Ð¾ÑÑаÑнÑо ÑимволÑв Ð´Ð»Ñ Ð¿Ð¾ÑÑкÑ!'); 5 return 6 } 7 $('.searchResult').html(''); 8 $('.searchResult').jmspinner(); 9 $.post( 10 "vendor/core.php", 11 { 12 "action" : "uploadSearchedData", 13 "data" : data 14 }, function(data){ 15 data = $.parseJSON(data); 16 data = Object.values(data); 17 if (data.length == 0){ 18 $('.searchResult').html('ÐÐ°Ð¶Ð°Ð»Ñ ÑезÑлÑÑаÑÑв не знайденo. СпÑобÑйÑе Ñе Ñаз!'); 19 $('.searchResult').jmspinner(false); 20 return 21 } 22 data = data.sort(function(obj1, obj2) { 23 return obj2.newsDate-obj1.newsDate; 24 }); 25 for (let i in data){ 26 if (data[i].newsDate < setDefaultDate()){ 27 $('.searchResult').append(` 28 <a class="news-itm-card" href="${linkFormatter(data[i].news_link, data[i].id)}"> 29 <div class="preview-img"> 30 <img src="media/news_imgs/${data[i].previewImg}" alt="${data[i].newsHeader}"> 31 </div> 32 <h3 class="news-header">${data[i].newsHeader}</h3> 33 <div class="news-time-wrapper"> 34 <span class="news-date">${dateFormatter('date',data[i].newsDate)}</span> 35 <span class="news-time">${dateFormatter('time',data[i].newsDate)}</span> 36 </div> 37 </a> 38 `); 39 } 40 $('.searchResult').jmspinner(false); 41 } 42 }); 43})
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.