PageSourceSearch

https://nerogiardini.it/cdn/shop/t/8/assets/cart.js?v=15808337772708315681776334117

js nerogiardini.it collected 2026-10-08 03:01:04 UTC 1,745 bytes, 2 lines download raw bytes

1import{showToast}from"@theme/critical";import{updateDomComponent}from"@theme/critical";import{openDrawerById}from"@theme/drawer-a11y";export async function initProductForm(form){form.onsubmit=ev=>(ev.preventDefault(),addToCart(form),!1),form.addEventListener("submit",ev=>{ev.preventDefault(),ev.stopImmediatePropagation(),addToCart(form)},{capture:!0}),form.dataset.blocked="true"}async function addToCart(form){let submitButton=form.querySelector('[type="submit"]');const formId=form.getAttribute("id");!submitButton&&formId&&(submitButton=document.querySelector(`[type="submit"][form="${formId}"]`));try{submitButton&&(submitButton.classList.add("is-loading"),submitButton.disabled=!0);const formData=new FormData(form),response=await fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",body:formData});if(!response.ok){const errorData=await response.json();throw new Error(errorData.description||"Errore durante l'aggiunta al carrello")}const data=await response.json();return await updateCartUI(),console.log("Prodotto aggiunto al carrello:",data),data}catch(error){console.error("Errore nell'aggiunta al carrello:",error),showToast(error.message,"error"),setTimeout(()=>{const toast=document.querySelector(".toast");toast&&toast.classList.add("invisible")},7e3)}finally{submitButton&&(submitButton.classList.remove("is-loading"),submitButton.disabled=!1)}}async function updateCartUI(){const returnFocusTo=document.activeElement,data=await updateDomComponent(["#cart","#cart-count"],["drawers","header"]);return document.getElementById("drawer-cart-panel")&&requestAnimationFrame(()=>{openDrawerById("drawer-cart-panel",returnFocusTo)}),data}
2//# sourceMappingURL=/cdn/shop/t/8/assets/cart.js.map?v=15808337772708315681776334117

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.