PageSourceSearch

https://hejholger.dk/cdn/shop/t/82/assets/prefetch.js?v=131414216486997149321789123784

js hejholger.dk collected 2026-10-08 19:04:36 UTC 2,258 bytes, 2 lines download raw bytes

1const STORE="theme:prefetched-products",fetched=new Set,safari=/safari/i.test(navigator.userAgent)&&!/chrome|android/i.test(navigator.userAgent);export function prefetchUrl(url,{kind}={}){if(!url||navigator.connection?.saveData)return!1;let target;try{target=new URL(url,location.href)}catch{return!1}if(target.origin!==location.origin||target.href===location.href)return!1;const href=target.href;if(kind==="product"&&remember(href),HTMLScriptElement.supports?.("speculationrules")){if(!document.querySelector(`script[type="speculationrules"][data-url="${href}"]`)){const rules=document.createElement("script");rules.type="speculationrules",rules.setAttribute("data-url",href),rules.textContent=JSON.stringify({prerender:[{source:"list",urls:[href]}]}),document.head.append(rules)}return!0}if(!document.querySelector(`link[rel="prefetch"][href="${href}"]`)){const link=document.createElement("link");link.rel="prefetch",link.href=href,document.head.append(link)}return safari&&!fetched.has(href)&&(fetched.add(href),fetch(href,{priority:document.readyState==="complete"?"high":"low"}).catch(()=>{})),!0}export function prefetchImage(src){if(!src||navigator.connection?.saveData)return!1;if(!document.querySelector(`link[rel="preload"][as="image"][href="${src}"]`)){const link=document.createElement("link");link.rel="preload",link.setAttribute("as","image"),link.href=src,document.head.append(link)}return!0}function remember(href){try{const urls=recall().filter(u=>u!==href);urls.unshift(href),sessionStorage.setItem(STORE,JSON.stringify(urls.slice(0,5)))}catch{}}function recall(){try{return JSON.parse(sessionStorage.getItem(STORE))||[]}catch{return[]}}function restore(){for(const url of recall())prefetchUrl(url)}let timer;function onIntent(event){const link=event.target.closest?.('.product-card a[href*="/products/"]');link&&(clearTimeout(timer),timer=setTimeout(()=>prefetchUrl(link.href,{kind:"product"}),300))}document.addEventListener("mouseover",onIntent,{passive:!0}),document.addEventListener("touchstart",onIntent,{passive:!0}),(window.requestIdleCallback||setTimeout)(restore),window.addEventListener("pageshow",event=>
1{event.persisted&&restore()});
2//# sourceMappingURL=/cdn/shop/t/82/assets/prefetch.js.map?v=131414216486997149321789123784

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.