PageSourceSearch

https://faector.nl/apps/event/build/cart-BLfwh0Wf.js

js faector.nl collected 2026-10-03 21:39:51 UTC 1,900 bytes, 1 lines download raw bytes

1class m{process(a){a.querySelectorAll("input").forEach(t=>t.addEventListener("change",async c=>{c.preventDefault(),await f(a,c.target)}))}}async function f(p,a){let t=a.closest("form"),c=t.getAttribute("action");t.querySelectorAll("fieldset p.error").forEach(e=>e.remove()),t.querySelectorAll(":scope > p.error").forEach(e=>e.remove()),t.querySelectorAll(".product-error").forEach(e=>e.remove()),t.querySelectorAll("tr.error").forEach(e=>e.classList.remove("error"));let i=await fetch(c,{method:"POST",body:new FormData(t),headers:{"x-requested-with":"fetch"}});if(i.ok){let e=await i.json(),l=t.querySelector("tfoot .total");l.textContent=e.productsDisplayTotal;for(let r of Object.keys(e.products))t.querySelectorAll('tbody tr[data-product-id="'+r+'"] .total').forEach(o=>o.textContent=e.products[r].displayTotal);t.querySelectorAll("tfoot tr.discount").forEach(r=>r.remove());for(let r of e.discountLines){let o=document.createElement("tr");o.classList.add("discount");let s=document.createElement("td"),n=document.createElement("th");n.setAttribute("colspan","2"),n.classList.add("price"),n.textContent=r.line;let d=document.createElement("td");d.classList.add("price"),d.classList.add("value"),d.textContent=r.displayTotal,o.appendChild(s),o.appendChild(n),o.appendChild(d);let u=l.closest("tr");u.parentNode.insertBefore(o,u)}}else{let e=await i.json();if(e.generalError){let l=document.createElement("p");l.classList.add("error"),l.textContent=e.generalError;let r=t.querySelector("table.shop-cart__table");r.parentNode.insertBefore(l,r)}if(e.errorDescription)for(let l of Object.keys(e.errorDescription)){let r=t.querySelector(`label[for=${l}]`);r.closest("tr").classList.add("error");let o=document.createElement("p");o.classList.add("product-error");let s=document.createElement("em");s.textContent=e.errorDescription[l],o.appendChild(s),r.parentNode.appendChild(o)}}}export{m as default};

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.