1/*Mob-menu hide/show*/ 2 function diplay_hide (blockId) { 3 if ($(blockId).css('display') == 'none') 4 { 5 $(blockId).animate({height: 'show'}, 500); 6 } 7 else 8 { 9 $(blockId).animate({height: 'hide'}, 500); 10 } 11} 12document.addEventListener('DOMContentLoaded', () => { 13 14 const getSort = ({ target }) => { 15 const order = (target.dataset.order = -(target.dataset.order || -1)); 16 const index = [...target.parentNode.cells].indexOf(target); 17 const collator = new Intl.Collator(['en', 'ru'], { numeric: true }); 18 const comparator = (index, order) => (a, b) => order * collator.compare( 19 a.children[index].innerHTML, 20 b.children[index].innerHTML 21 ); 22 23 for(const tBody of target.closest('table').tBodies) 24 tBody.append(...[...tBody.rows].sort(comparator(index, order))); 25 26 for(const cell of target.parentNode.cells) 27 cell.classList.toggle('sorted', cell === target); 28 }; 29 30 document.querySelectorAll('.table_sort thead').forEach(tableTH => tableTH.addEventListener('click', () => getSort(event))); 31 32}); 33 34$(document).ready(function() { 35 $("#hamburger").on('click', function(){ 36 37 $("body").toggleClass('mobBody'); 38 $("#back-top").toggleClass('disable'); 39 40 }) 41}) 42/*//////////////////////*/ 43 44const selectedIcon = document.getElementById('selected-icon'); 45 const errorSendForm = document.getElementById('error-send-form'); 46 const errorSendFormCloseBtn = document.getElementById('error-send-form-close-btn'); 47 const errorSendFormBtn = document.getElementById('error-send-form-btn'); 48 let selectedText = ''; 49 let selectedTextForSend = ''; 50 document.onmouseup = ()=>{ 51 const selection = window.getSelection().toString(); 52 if (selection.length > 0) { 53 const selectedTextRect = window.getSelection().getRangeAt(0).getBoundingClientRect(); 54 const iconTop = selectedTextRect.top + window.pageYOffset - selectedIcon.offsetHeight + 25; 55 const iconLeft = selectedTextRect.right; 56 selectedIcon.style.top = `${iconTop}px`; 57 selectedIcon.style.left = `${iconLeft}px`; 58 selectedIcon.style.display = 'block'; 59 selectedText = selection 60 } else { 61 selectedIcon.style.display = 'none'; 62 } 63 } 64 65 selectedIcon.onclick = ()=> { 66 errorSendForm.style.display = 'block' 67 errorSendFormBtn.value = 'ÐÑпÑавиÑÑ' 68 selectedTextForSend = selectedText 69 } 70 errorSendFormCloseBtn.onclick = ()=> { 71 errorSendForm.style.display = 'none' 72 } 73 errorSendForm.addEventListener("submit", function(event) { 74 event.preventDefault(); // ÐÑменÑем ÑÑандаÑÑное поведение оÑпÑавки ÑоÑÐ¼Ñ 75 76 var form = this; 77 var formData = new FormData(form); 78 79 // ÐÑовеÑка «не ÑобоÑ» â код Ñ ÐºÐ°ÑÑинки ÑобÑÑвенной капÑи ÑайÑа. 80 if (!(formData.get('error_desc') || '').trim()) { 81 errorSendFormBtn.value = 'ÐпиÑиÑе оÑибкÑ'; 82 setTimeout(function(){ errorSendFormBtn.value = 'ÐÑпÑавиÑÑ'; }, 2000); 83 return; 84 } 85 if (!(formData.get('fg_code') || '').trim()) { 86 errorSendFormBtn.value = 'ÐведиÑе код Ñ ÐºÐ°ÑÑинки'; 87 setTimeout(function(){ errorSendFormBtn.value = 'ÐÑпÑавиÑÑ'; }, 2000); 88 return; 89 } 90 91 formData.append('url', window.location.href); 92 formData.append('selectedText', selectedTextForSend); 93 errorSendFormBtn.value = 'ÐдÑÑ Ð·Ð°Ð¿ÑоÑ...'; 94 95 fetch('/send-error.php', { 96 method: 'POST', 97 body: formData 98 }).then(function (res) { 99 return res.json().catch(function () { return { success: res.ok, message: '' }; }); 100 }).then(function (data) { 101 if (data && data.success) { 102 errorSendFormBtn.value = 'ÐапÑÐ¾Ñ Ð¾ÑпÑавлен!'; 103 setTimeout(function () { 104 errorSendForm.style.display = 'none'; 105 errorSendFormBtn.value = 'ÐÑпÑавиÑÑ'; 106 form.reset(); 107 }, 2000); 108 return; 109 } 110 // Ðод одноÑазовÑй â поÑле неÑдаÑи запÑаÑиваем новÑÑ ÐºÐ°ÑÑинкÑ. 111 errorSendFormBtn.value = (data && data.message) ? data.message : 'ÐÑоизоÑла оÑибка'; 112 var box = form.querySelector('.fg-captcha'); 113 if (box && window.fgReload) { window.fgReload(box); } 114 setTimeout(function(){ errorSendFormBtn.value = 'ÐÑпÑавиÑÑ'; }, 4000); 115 }).catch(function () { 116 errorSendFormBtn.value = 'ÐÑоизоÑла оÑибка'; 117 setTimeout(function(){ errorSendFormBtn.value = 'ÐÑпÑавиÑÑ'; }, 3000); 118 }); 119 });
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.