1document.addEventListener('click', async function (e) { 2 const btn = e.target.closest('.load_more'); 3 4 if (!btn) return; 5 6 const targetContainer = document.querySelector('.js-navContainer'); 7 const url = btn.dataset.url; 8 9 if (url !== undefined && !btn.classList.contains('loading')) { 10 btn.classList.add('loading'); 11 btn.textContent = 'ÐагÑÑзка...'; 12 13 try { 14 const response = await fetch(url); 15 16 if (!response.ok) { 17 throw new Error('ÐÑибка загÑÑзки'); 18 } 19 20 const data = await response.text(); 21 22 const parser = new DOMParser(); 23 const doc = parser.parseFromString(data, 'text/html'); 24 25 document.querySelector('.load_more')?.remove(); 26 27 const elements = doc.querySelector('.js-navContainer')?.innerHTML || ''; 28 const pagination = doc.querySelector('.pagination-panel')?.innerHTML || ''; 29 30 targetContainer.insertAdjacentHTML('beforeend', elements); 31 32 const paginationPanel = document.querySelector('.pagination-panel'); 33 34 if (paginationPanel) { 35 paginationPanel.innerHTML = pagination; 36 } 37 38 } catch (error) { 39 btn.classList.remove('loading'); 40 btn.textContent = 'ÐÑибка, попÑобÑйÑе Ñнова'; 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.