PageSourceSearch

https://www.techpunt.nl/cdn/shop/t/66/assets/recently-viewed-products.js?v=27075323814696032361790892276

js techpunt.nl collected 2026-10-06 05:03:01 UTC 2,013 bytes, 2 lines download raw bytes

1customElements.get("recently-viewed-products")||customElements.define("recently-viewed-products",class extends HTMLElement{constructor(){super(),"requestIdleCallback"in window?requestIdleCallback(this.init.bind(this),{timeout:1500}):FoxTheme.Motion.inView(this,this.init.bind(this),{margin:"0px 0px 400px 0px"})}init(){const queryUrl=this.getQueryUrl();if(!queryUrl){this.removeSection();return}fetch(queryUrl).then(response=>response.text()).then(responseText=>{const sectionInnerHTML=new DOMParser().parseFromString(responseText,"text/html").querySelector(".shopify-section");if(sectionInnerHTML===null)return;const recommendations=sectionInnerHTML.querySelector("recently-viewed-products");recommendations&&recommendations.innerHTML.trim().length&&(recommendations.querySelector(".section").classList.remove("hidden"),this.innerHTML=recommendations.innerHTML),recommendations.querySelector(".product-card")?this.dispatchEvent(new CustomEvent("recommendations:loaded")):(this.removeSection(),this.dispatchEvent(new CustomEvent("recommendations:empty")))}).catch(e=>{console.error(e)})}
1getQueryUrl(){const items=JSON.parse(window.localStorage.getItem("hypertheme:recently-viewed")||"[]"),productId=parseInt(this.dataset.productId),productsToShow=parseInt(this.dataset.productsToShow);if(items.includes(productId)&&items.splice(items.indexOf(productId),1),items.length>0){const queryParams=items.map(item=>"id:"+item).slice(0,productsToShow).join(" OR ");return this.dataset.url+queryParams}return!1}removeSection(){this.remove()}sendTrekkieEvent(numberProducts){if(!window.ShopifyAnalytics||!window.ShopifyAnalytics.lib||!window.ShopifyAnalytics.lib.track)return;let didPageJumpOccur=this.getBoundingClientRect().top<=window.innerHeight;window.ShopifyAnalytics.lib.track("Recently Viewed Products Displayed",{theme:Shopify.theme.name,didPageJumpOccur,numberOfRecommendationsDisplayed:numberProducts})}});
2//# sourceMappingURL=/cdn/shop/t/66/assets/recently-viewed-products.js.map?v=27075323814696032361790892276

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.