1(function () { 2 const STORAGE_KEY = 'penci_pagination_scroll'; 3 4 function getHeaderOffset() { 5 const header = document.querySelector('.penci-header-wrap'); 6 return header ? header.offsetHeight : 0; 7 } 8 9 // Capture pagination click 10 document.addEventListener('click', function (e) { 11 const link = e.target.closest('.penci-pagination a.page-numbers'); 12 if (!link) return; 13 14 const elementorEl = link.closest('.elementor-element'); 15 if (!elementorEl) return; 16 17 const elIdClass = [...elementorEl.classList].find(cls => 18 cls.indexOf('elementor-element-') === 0 19 ); 20 21 const rect = elementorEl.getBoundingClientRect(); 22 const scrollTop = window.pageYOffset || document.documentElement.scrollTop; 23 24 sessionStorage.setItem( 25 STORAGE_KEY, 26 JSON.stringify({ 27 id: elIdClass || null, 28 top: rect.top + scrollTop 29 }) 30 ); 31 }); 32 33 // Restore scroll position 34 window.addEventListener('load', function () { 35 const raw = sessionStorage.getItem(STORAGE_KEY); 36 if (!raw) return; 37 38 try { 39 const data = JSON.parse(raw); 40 let targetTop = data.top; 41 42 if (data.id) { 43 const targetEl = document.querySelector('.' + data.id); 44 if (targetEl) { 45 const rect = targetEl.getBoundingClientRect(); 46 const scrollTop = window.pageYOffset || document.documentElement.scrollTop; 47 targetTop = rect.top + scrollTop; 48 } 49 } 50 51 // Apply header spacing 52 targetTop -= getHeaderOffset(); 53 54 window.scrollTo({ 55 top: Math.max(targetTop, 0), 56 behavior: 'smooth' 57 }); 58 } catch (e) {} 59 60 sessionStorage.removeItem(STORAGE_KEY); 61 }); 62})();
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.