PageSourceSearch

https://www.lazylama.nl/cdn/shop/t/4/assets/wishlist.js?v=134651247862222988861790344655

js lazylama.nl collected 2026-10-07 18:55:31 UTC 2,308 bytes, 2 lines download raw bytes

1const STORES={wishlist:"lazy-lama:wishlist",gift:"lazy-lama:cadeaulijst"};export const CHANGE_EVENT="wishlist:change";const LABELS={wishlist:{on:"Van je verlanglijst halen",off:"Op je verlanglijst zetten"},gift:{on:"Staat op je cadeaulijst, klik om te verwijderen",off:"Zet op cadeaulijst",onText:"Op je cadeaulijst",offText:"Zet op cadeaulijst"}},listOf=button=>button.dataset.wishlistList==="gift"?"gift":"wishlist";export const read=list=>{try{const stored=JSON.parse(localStorage.getItem(STORES[list])??"[]");return Array.isArray(stored)?stored.filter(entry=>typeof entry=="string"):[]}catch{return[]}},write=(list,handles)=>{try{localStorage.setItem(STORES[list],JSON.stringify([...new Set(handles)]))}catch{}document.dispatchEvent(new CustomEvent(CHANGE_EVENT,{detail:{list}}))};const paint=(button,saved)=>{const labels=LABELS[listOf(button)];button.setAttribute("aria-pressed",String(saved)),button.setAttribute("aria-label",saved?labels.on:labels.off);const text=button.querySelector("[data-wishlist-text]");text&&labels.onText&&(text.textContent=saved?labels.onText:labels.offText)},sync=()=>{const cached={};document.querySelectorAll("[data-wishlist]").forEach(button=>{const list=listOf(button);cached[list]??=read(list),paint(button,cached[list].includes(button.dataset.wishlist))})};document.addEventListener("click",event=>{const button=event.target.closest?.("[data-wishlist]");if(!button)return;const list=listOf(button),handle=button.dataset.wishlist,wanted=button.getAttribute("aria-pressed")!=="true",next=read(list).filter(entry=>entry!==handle);wanted&&next.push(handle),write(list,next),document.querySelectorAll(`[data-wishlist="${CSS.escape(handle)}"]`).forEach(other=>{listOf(other)===list&&paint(other,wanted)})}),new MutationObserver(records=>{records.some(record=>Array.from(record.addedNodes).some(node=>node.nodeType===Node.ELEMENT_NODE&&(node.matches("[data-wishlist]")||node.querySelector("[data-wishlist]"))))&&sync()}).observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener("storage",event=>{const list=Object.keys(STORES).find(key=>STORES[key]===event.key);list&&(sync(),document.dispatchEvent(new CustomEvent(CHANGE_EVENT,{detail:{list}})))}),sync();
2//# sourceMappingURL=/cdn/shop/t/4/assets/wishlist.js.map?v=134651247862222988861790344655

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.