PageSourceSearch

https://www.charbroil.com/cdn/shop/t/63/assets/recently_viewed.js?v=49009377724350176881785178065

js charbroil.com collected 2026-09-24 10:40:45 UTC 2,767 bytes, 2 lines download raw bytes

1if(!customElements.get("recently-viewed")){class RecentlyViewed extends HTMLElement{constructor(){super(),this.productHandle=this.dataset.productHandle,this.limit=this.dataset.limit,this.html=document.createElement("div"),this.templateContent=this.querySelector("template").content.cloneNode(!0),this.templateRootElement=this.templateContent.querySelector(".products-carousel-root"),this.itemsContent=this.templateRootElement.querySelector(".keen-slider, .grid"),this.cookieName="shopify_recently_viewed",this.recentlyViewed=this.getRecentlyViewed(),this.recordRecentlyViewed(this.productHandle),this.dataset.mode.indexOf("display")>-1&&this.showRecentlyViewed()}recordRecentlyViewed(handle){if(handle){var position=this.recentlyViewed.indexOf(handle);position===-1?this.recentlyViewed.unshift(handle):(this.recentlyViewed.splice(position,1),this.recentlyViewed.unshift(handle)),this.recentlyViewed=this.recentlyViewed.splice(0,this.limit),this.writeRecentlyViewed()}}getRecentlyViewed(){var cookieValue=Cookies.get(this.cookieName);return cookieValue?cookieValue.split(" "):[]}removeHandle(handle){var position=this.recentlyViewed.indexOf(handle);position!==-1&&(this.recentlyViewed.splice(position,1),this.writeRecentlyViewed())}writeRecentlyViewed(){Cookies.set(this.cookieName,this.recentlyViewed.join(" "),{expires:7})}showRecentlyViewed(){var handles=this.recentlyViewed.filter(x=>x!=this.productHandle),handlesUrls=handles.map(handle=>({handle,url:routes.products_url+"/"+handle+"?sections=product_card_ajax"})),urls=handlesUrls.map(x=>x.url);$s.getDataFromUrls(urls).then(data=>{var html="";handlesUrls.forEach(x=>{var handle=x.handle,url=x.url,parser=new DOMParser;if(data[url])try{var ajaxHtml=JSON.parse(data[url]).product_card_ajax,itemDoc=parser.parseFromString(ajaxHtml,"text/html"),itemHTML=itemDoc.querySelector(".product-card-ajax").innerHTML;itemHTML?html+=itemHTML:this.removeHandle(handle)}catch(e){console.error(e)}else this.removeHandle(handle)}),html!=""&&(html=this.itemsContent.classList.contains("grid")?html.replaceAll("keen-slider-slide","grid-item"):html,this.style.display="",this.itemsContent.innerHTML=html,this.itemsContent.querySelectorAll(".product-card").forEach(card=>{this.dataset.cardsColorScheme&&card.classList.add("scheme",...this.dataset.cardsColorScheme.split(" ")),this.dataset.cardsColorScheme==this.dataset.contentColorScheme?(card.classList.add("same-scheme-true"),card.classList.remove("same-scheme-false")):(card.classList.add("same-scheme-false"),card.classList.remove("same-scheme-true"))}),this.insertAdjacentElement("beforeend",this.templateRootElement))})}}customElements.define("recently-viewed",RecentlyViewed)}
2//# sourceMappingURL=/cdn/shop/t/63/assets/recently_viewed.js.map?v=49009377724350176881785178065

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.