PageSourceSearch

https://shop.ignatiansolidarity.net/cdn/shop/t/6/assets/cart-recom…?v=151337948683935857111727802274

js ignatiansolidarity.net collected 2026-09-24 18:58:06 UTC 1,969 bytes, 2 lines download raw bytes

1class CartRecommendationsComponent extends HTMLElement{constructor(){super()}connectedCallback(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("#shopify-section-cart-recommendations");recommendations&&recommendations.querySelectorAll(".f-cart-recommendations__item").length&&(this.innerHTML=recommendations.innerHTML)}).catch(err=>console.error(err))}}if(customElements.define("cart-recommendations-component",CartRecommendationsComponent),!customElements.get("add-to-cart-component")){class AddToCartComponent extends HTMLElement{constructor(){super(),this.cartDrawer=document.querySelector("cart-drawer"),this.addToCartButton=this.querySelector(".f-cart-recommendations__item-add-to-cart"),this.addEventListener("click",this.onSubmitHandler.bind(this))}onSubmitHandler(){this.addToCartButton.classList.add("btn--loading");const variantId=this.dataset.variantId;if(!variantId)return;const config={method:"POST",headers:{Accept:"application/javascript","X-Requested-With":"XMLHttpRequest"}},formData=new FormData;formData.append("id",variantId),formData.append("quantity",1),this.cartDrawer&&(formData.append("sections",this.cartDrawer.getSectionsToRender().map(section=>section.id)),formData.append("sections_url",window.location.pathname)),config.body=formData,fetch(`${FoxThemeSettings.routes.cart_add_url}`,config).then(response=>response.json()).then(response=>{if(response.status)return this.Notification.show({target:document.body,method:"appendChild",type:"warning",message:response.description,last:3e3,sticky:!0});window.FoxThemeEvents.emit("ON_ITEM_ADDED",response)}).catch(e=>{console.error(e)}).finally(()=>{this.addToCartButton.classList.remove("btn--loading")})}}customElements.define("add-to-cart-button",AddToCartComponent)}
2//# sourceMappingURL=/cdn/shop/t/6/assets/cart-recommendations.js.map?v=151337948683935857111727802274

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.