PageSourceSearch

https://jacobsons.ca/cdn/shop/t/13/assets/script.cart.js?v=136427929359658811001781794224

js jacobsons.ca collected 2026-10-03 21:35:01 UTC 4,859 bytes, 2 lines download raw bytes

1function CartReload(data){var container=document.getElementById("cart-table"),tT=document.getElementById("total-top"),c=document.querySelector(".cart-table-body"),tB=document.getElementById("total-bottom");const htmlDocument=new DOMParser().parseFromString(data,"text/html");var nTT=htmlDocument.documentElement.querySelector("#total-top"),nC=htmlDocument.documentElement.querySelector(".cart-table-body"),nTB=htmlDocument.documentElement.querySelector("#total-bottom");tT.replaceWith(nTT),c.replaceWith(nC),tB.replaceWith(nTB),container.querySelector(".full-form").classList.remove("hidden"),container.querySelector(".empty-form").classList.add("hidden"),Quantity(container),CartButtons()}function CartChange(q,container){var header=document.querySelector("header"),it=q.closest(".item"),id=it.getAttribute("data-product-id"),q=it.querySelector(".item-qty").value,iQ=it.querySelector(".item-qty"),s=it.querySelector(".error"),aB=document.getElementById("ajaxBusy"),cTa=document.getElementById("cart-table"),cC=document.querySelectorAll(".cartCountSelector"),cT=document.querySelector(".cartTotalSelector"),tT=document.getElementById("total-cart-top"),c=document.querySelector(".cart-table-body"),tC=document.getElementById("cart-total"),tB=document.getElementById("total-cart-bottom"),dC=document.querySelector(".discount-cart"),aS=document.querySelector(".animate-section"),cD=document.getElementById("cart-dropdown");q!=""&&(aB.style.display="block"),fetch(theme.routes_cart_change_url+".js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({quantity:q,id})}).then(function(r){return r.json()}).then(function(j){if(q!=""&&(cC.forEach(function(c2){c2.textContent=j.item_count}),header&&(cT.innerHTML=Shopify.formatMoney(j.total_price,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,""),tT.innerHTML=Shopify.formatMoney(j.total_price,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,"")),j.cart_level_discount_applications&&j.cart_level_discount_applications.length>0&&(tC.innerHTML=Shopify.formatMoney(j.items_subtotal_price,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,""),dC.innerHTML=Shopify.formatMoney("-"+j.total_discount,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,"")),tB.innerHTML=Shopify.formatMoney(j.total_price,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,"")),j.item_count==0)ShippingMsg(),cTa.querySelector(".full-form").classList.add("hidden"),cTa.querySelector(".empty-form").classList.remove("hidden"),aB.style.display="none",theme.dropdown==!0&&(document.querySelector(".cart-count-mobile").setAttribute("href",theme.routes_cart_url),document.querySelector(".cart-count-mobile").classList.remove("void")),cD&&cD.remove();else{var x=theme.cart;CartDrop(x),document.dispatchEvent(new CustomEvent("cartItems",{bubbles:!0})),fetch(theme.routes_cart_url).then(response=>response.text()).then(data=>{q!=""&&(q==0&&it.remove(),CartReload(data),aB.style.display="none")}).catch(function(err){console.error("!: "+err)})}}).catch(function(err){console.error("!: "+err)})}function CartButtons(){var container=document.getElementById("cart-table"),qB=container.querySelectorAll(".qtybtn");qB.forEach(function(q){if(q.classList.contains("icon-plus"))var qF=q.closest(".qtyOpt.form"),vV=qF.querySelector(".item-qty").value,vM=qF.querySelector(".item-qty").getAttribute("max");setTimeout(function(){q.onclick=function(ev){vM&&vM==vV||CartChange(q,container)}},1)});var qI=container.querySelectorAll(".item-qty");qI.forEach(function(q){let timeout;var vV=q.value,vM=q.getAttribute("max");q.addEventListener("keyup",function(e){if(!(e.key=="Tab"||e.key=="Shift")){var nV=q.value;clearTimeout(timeout),timeout=setTimeout(function(){vM&&nV==vV&&vM==nV||CartChange(q,container)},750)}})})}theme.CartPage=(function(){function CartPage(container){var sectionId=container.getAttribute("data-section-id"),chk=container.getAttribute("data-check"),acb=container.querySelector(".additional-checkout-buttons");if(theme.cart=!0,Quantity(container),chk=="true"){var nC=container.querySelector('[name="checkout"]');document.getElementById("cart-terms").onclick=function(ev){this.checked==!0?(nC.classList.remove("outline"),nC.removeAttribute("disabled"),nC.setAttribute("aria-label",theme.language.cart_general_checkout),nC.value=theme.language.cart_general_checkout,nC.textContent=theme.language.cart_general_checkout,acb&&acb.classList.remove("hidden")):(nC.classList.add("outline"),nC.setAttribute("disabled",!0),nC.setAttribute("aria-label",theme.language.cart_general_agree),nC.value=theme.language.cart_general_agree,nC.textContent=theme.language.cart_general_agree,acb&&acb.classList.add("hidden"))}}CartButtons(container),Shopify&&Shopify.StorefrontExpressButtons&&Shopify.StorefrontExpressButtons.initialize()}return CartPage})();
2//# sourceMappingURL=/cdn/shop/t/13/assets/script.cart.js.map?v=136427929359658811001781794224

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.