PageSourceSearch

https://fochtmann.de/cdn/shop/t/4/assets/dark-mode-toggle.js?v=80385332958793948141771842657

js fochtmann.de collected 2026-10-02 22:40:42 UTC 1,667 bytes, 2 lines download raw bytes

1(()=>{const HTML_CLASS="is-dark-mode-page",LINK_ATTR="data-dark-mode-css",ensureCss=cssUrl=>{if(!cssUrl)return;const existing=document.querySelector(`link[rel="stylesheet"][${LINK_ATTR}]`);if(existing){existing.getAttribute("href")!==cssUrl&&existing.setAttribute("href",cssUrl);return}const link=document.createElement("link");link.rel="stylesheet",link.href=cssUrl,link.setAttribute(LINK_ATTR,"1"),document.head.appendChild(link)},removeCss=()=>{const existing=document.querySelector(`link[rel="stylesheet"][${LINK_ATTR}]`);existing&&existing.remove()},getAllToggles=()=>Array.from(document.querySelectorAll("[data-dark-mode-toggle]")),isAnyEnabled=()=>getAllToggles().some(el=>String(el.dataset.enabled)==="true"),getEnabledCssUrl=()=>{const el=getAllToggles().find(x=>String(x.dataset.enabled)==="true"&&x.dataset.cssUrl);return el?el.dataset.cssUrl:""},applyState=()=>{isAnyEnabled()?(document.documentElement.classList.add(HTML_CLASS),ensureCss(getEnabledCssUrl())):(document.documentElement.classList.remove(HTML_CLASS),removeCss())},applyForSectionId=sectionId=>{if(!sectionId)return applyState();applyState()};document.addEventListener("DOMContentLoaded",applyState),document.addEventListener("shopify:section:load",e=>{applyForSectionId(e?.detail?.sectionId)}),document.addEventListener("shopify:section:unload",e=>{applyForSectionId(e?.detail?.sectionId)}),document.addEventListener("shopify:section:select",e=>{applyForSectionId(e?.detail?.sectionId)}),document.addEventListener("shopify:section:deselect",e=>{applyForSectionId(e?.detail?.sectionId)})})();
2//# sourceMappingURL=/cdn/shop/t/4/assets/dark-mode-toggle.js.map?v=80385332958793948141771842657

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.