1(function () { 2 function setAriaCurrent() { 3 var path = window.location.pathname.replace(/\.html$/, '').replace(/\/+$/, '') || '/'; 4 document.querySelectorAll('.nav-links a').forEach(function(a) { 5 var href = a.getAttribute('href').replace(/\.html$/, '').replace(/\/+$/, '') || '/'; 6 if (path === href || (href !== '/' && path.startsWith(href))) { 7 a.setAttribute('aria-current', 'page'); 8 } 9 }); 10 } 11 12 document.addEventListener('partials-loaded', setAriaCurrent); 13 14 const targets = document.querySelectorAll('[data-include]'); 15 if (!targets.length) { 16 document.dispatchEvent(new CustomEvent('partials-loaded')); 17 return; 18 } 19 const promises = Array.from(targets).map(async (el) => { 20 const name = el.getAttribute('data-include'); 21 try { 22 const res = await fetch('/partials/' + name + '.html', { cache: 'no-cache' }); 23 if (!res.ok) throw new Error('HTTP ' + res.status); 24 el.outerHTML = await res.text(); 25 } catch (err) { 26 console.error('[include] failed to load', name, err); 27 } 28 }); 29 Promise.all(promises).then(() => { 30 document.dispatchEvent(new CustomEvent('partials-loaded')); 31 }); 32})(); 33 34 35// Cloudflare Web Analytics beacon (human-only RUM: pageviews + referrers) 36(function(){ 37 var s=document.createElement('script'); 38 s.src='https://static.cloudflareinsights.com/beacon.min.js'; 39 s.defer=true; 40 s.setAttribute('data-cf-beacon',"{\"token\": \"5fc2f562979c4f58b2af751d012c1712\"}"); 41 document.head.appendChild(s); 42})();
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.