PageSourceSearch

https://bernstein-badshop.de/cdn/shop/t/2/assets/theme.js?v=10438521352734580191770901884

js bernstein-badshop.de collected 2026-09-26 02:25:52 UTC 7,657 bytes, 1 lines download raw bytes

1class Theme{constructor(){this.main=document.querySelector(".main"),this.lastScroll=document.documentElement.scrollTop,this.header=document.querySelector(".header"),this.megamenu=document.querySelector("mega-menu");const o=document.querySelectorAll("[data-cart-count]"),r=document.querySelector(".section--cart-recommendations");window.addEventListener("cartCounterUpdate",e=>{fetch("/cart.js",{method:"GET"}).then(e=>e.json()).then(t=>{o.forEach(e=>{e.innerHTML=""+t.item_count,0<t.item_count?(e.style.display="inline-flex",e.parentElement.classList.remove("header__icon--empty"),localStorage.setItem("bernstein-cart-updated",Date.now())):(e.style.display="none",e.parentElement.classList.add("header__icon--empty"),localStorage.removeItem("bernstein-cart-updated"),r&&r.remove())})})}),document.addEventListener("keydown",e=>{"Escape"===e.key&&window.dispatchEvent(new CustomEvent("escPressed"))}),document.querySelectorAll("[data-scroll-top]").forEach(e=>{e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}),document.querySelectorAll("[data-scroll-to]").forEach(e=>{e.addEventListener("click",()=>{window.scrollTo({top:document.querySelector(e.getAttribute("data-scroll-to")).offsetTop,behavior:"smooth"})})}),document.querySelectorAll("[data-go-back]").forEach(e=>{e.addEventListener("click",()=>{window.location.href=document.referrer})}),document.querySelectorAll("[data-copy-clipboard]").forEach(o=>{o.addEventListener("click",e=>{if(e.preventDefault(),this.copy_to_clipboard(o.getAttribute("data-copy-clipboard")),o.getAttribute("data-message")){const t=o.innerText;o.innerText=o.getAttribute("data-message"),setTimeout(()=>{o.innerText=t},3e3)}})}),document.querySelectorAll('[aria-controls*="drawer-"]').forEach(r=>{r.addEventListener("click",()=>{var e=r.getAttribute("data-heading")?r.getAttribute("data-heading"):null,t=r.getAttribute("data-richtext")?r.getAttribute("data-richtext"):null,o=r.dataset.section||null;window.dispatchEvent(new CustomEvent("drawerOpen",{detail:{id:r.getAttribute("aria-controls"),heading:e,richtext:t,section:o}}))})}
1),document.querySelectorAll('[href*="#cookie-settings"]').forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),window.__cmp("showScreenAdvanced")})}),document.querySelector(".main").addEventListener("click",()=>{window.matchMedia("(min-width: 1200px)").matches&&"function"==typeof obj&&this.megamenu.close()}),setTimeout(()=>{window.dispatchEvent(new Event("scroll")),window.dispatchEvent(new Event("resize"))}),this.init_scrollbar_width(),this.init_badges(),this.init_horizontal_menu(),this.watch_doofinder()}disable_scroll(){this.main.style.position="fixed",this.main.style.top=this.main.offsetTop-this.lastScroll+"px",this.main.style.pointerEvents="none",this.lockScroll=!0,setTimeout(()=>{window.scrollTo({top:0,behavior:"instant"})})}enable_scroll(){this.main.style.position="relative",this.main.style.top="0px",this.main.style.pointerEvents="auto",window.scrollTo({top:this.lastScroll,behavior:"instant"}),setTimeout(()=>{this.lockScroll=!1},200)}slide_up(e){e.style.transitionProperty="height, margin, padding",e.style.transitionDuration="300ms",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},300)}slide_down(e){e.style.removeProperty("display");let t=window.getComputedStyle(e).display;"none"===t&&(t="block"),e.style.display=t;var o=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration="300ms",e.style.height=o+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},300)}format_money(e){"string"==typeof e&&(e=e.replace(".",""));var t="",o=/\{\{\s*(\w+)\s*\}\}/,r=window.moneyFormat;function n(e,t){return void 0===e?t:e}function i(e,t,o,r){return t=n(t,2),o=n(o,","),r=n(r,"."),isNaN(e)||null==e?0:(t=(e=(e/100).toFixed(t)).split("."))[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+o)+(t[1]?r+t[1]:"")}switch(r.match(o)[1]){case"amount":t=i(e,2);break;case"amount_no_decimals":t=i(e,0);break;case"amount_with_comma_separator":t=i(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":t=i(e,0,".",",")}return r.replace(o,t)}init_scrollbar_width(){var e=document.createElement("div"),t=(e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e),document.createElement("div"));e.appendChild(t),window.scrollbarWidth=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e)}init_badges(){const e=document.body.classList.contains("start-with-badges");let t=!1,o,r;const n=setInterval(()=>{1<(o=document.querySelectorAll('[id*="trustbadge-container-"]')).length&&clearInterval(n)},500),i=setInterval(()=>{(r=document.querySelector("#launcher"))&&clearInterval(i)},500);new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(document.body.classList.add("hide-badges"),t=!0):t&&(document.body.classList.remove("hide-badges"),t=!1)})}).observe(document.querySelector(".footer")),window.addEventListener("scroll",()=>{this.toggle_badges(t,e)}),window.addEventListener("badgesScroll",()=>{this.toggle_badges(t,e)}),setTimeout(()=>{var e=document.createElement("style");e.innerText='[id*="trustbadge-container-"], #launcher { transition: opacity .2s linear !important; }',document.body.append(e)},1e3)}toggle_badges(e,t){e||(window.lockScroll?document.body.classList.add("hide-badges"):t&&window.matchMedia("(max-width: 1199px)").matches?window.lastScroll<66?document.body.classList.remove("hide-badges"):document.body.classList.add("hide-badges"):200<window.lastScroll?document.body.classList.remove("hide-badges"):document.body.classList.add("hide-badges"))}init_horizontal_menu(){document.querySelectorAll(".main-blog__tabs").forEach(e
1=>{var t,o,r,n=e.querySelector('[aria-expanded="true"]');n&&(t=n.offsetLeft+n.offsetWidth,n=n.offsetLeft,o=e.offsetLeft+e.offsetWidth,r=e.offsetLeft,t>o+e.scrollLeft?e.scrollLeft=t-o:n<r+e.scrollLeft&&(e.scrollLeft=n-r))})}watch_doofinder(){let e;const t=setInterval(()=>{(e=document.querySelector(".dfd-root"))&&(clearInterval(t),new MutationObserver(e=>{e.forEach(e=>{"attributes"===e.type&&"class"===e.attributeName&&(e.target.classList.contains("dfd-animate")?this.header.classList.add("header--force-lighter"):this.header.classList.remove("header--force-lighter"))})}).observe(e,{attributes:!0}))},500)}copy_to_clipboard(e){var t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="2em",t.style.height="2em",t.style.padding=0,t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.log("Oops, unable to copy")}document.body.removeChild(t)}}window.theme=new Theme;

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.