1// Warm public documents without intercepting navigation or delaying user input. 2(() => { 3 // Public documents only: no private jobs, drafts, trials or API mutations. 4 const prefetched = new Set(); 5 function preload(event) { 6 if (navigator.connection?.saveData) return; 7 const anchor = event.target instanceof Element ? event.target.closest('a[href]') : null; 8 if (!anchor || anchor.target || anchor.hasAttribute('download')) return; 9 const url = new URL(anchor.href, location.href); 10 if (url.origin !== location.origin || url.search || url.hash || url.pathname === location.pathname) return; 11 if (!/^\/(?:resources(?:\/(?!admin(?:\/|$))[^/]+)?|try|pricing)?\/?$/.test(url.pathname)) return; 12 if (prefetched.has(url.href) || prefetched.size >= 8) return; 13 prefetched.add(url.href); 14 const link = document.createElement('link');link.rel = 'prefetch';link.href = url.href;document.head.append(link); 15 } 16 document.addEventListener('pointerover', preload, {passive:true}); 17 document.addEventListener('focusin', preload); 18})();
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.