PageSourceSearch

https://schiang-living.dk/cdn/shop/t/24/assets/onlineplus.js?v=138067701080583225721786093709

js schiang-living.dk collected 2026-09-26 14:28:00 UTC 5,703 bytes, 2 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){var btn=document.getElementById("scroll-past-slideshow");btn&&btn.addEventListener("click",function(){var slideshow=document.querySelector(".slideshow-section"),header=document.querySelector("header");if(slideshow){var rect=slideshow.getBoundingClientRect(),scrollTop=window.pageYOffset||document.documentElement.scrollTop,headerHeight=header?header.offsetHeight:0;window.scrollTo({top:rect.bottom+scrollTop-headerHeight,behavior:"smooth"})}});const dropdown=document.getElementById("CustomSortDropdown");if(dropdown){const optionsList=dropdown.querySelector(".custom-dropdown__options"),selected=dropdown.querySelector(".custom-dropdown__selected"),options=dropdown.querySelectorAll(".custom-dropdown__option");dropdown.addEventListener("click",function(e){e.stopPropagation();const expanded=dropdown.getAttribute("aria-expanded")==="true";dropdown.setAttribute("aria-expanded",!expanded),optionsList.style.display=expanded?"none":"block"}),options.forEach(option=>{option.addEventListener("click",function(e){e.stopPropagation(),selected.textContent=option.textContent,options.forEach(opt=>opt.classList.remove("selected")),option.classList.add("selected"),optionsList.style.display="none",dropdown.setAttribute("aria-expanded","false"),window.location.search=updateQueryStringParameter(window.location.search,"sort_by",option.dataset.value)})}),document.addEventListener("click",function(){optionsList.style.display="none",dropdown.setAttribute("aria-expanded","false")}),dropdown.addEventListener("keydown",function(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();let idx=Array.from(options).findIndex(opt=>opt.classList.contains("selected"));e.key==="ArrowDown"&&(idx=(idx+1)%options.length),e.key==="ArrowUp"&&(idx=(idx-1+options.length)%options.length),options.forEach(opt=>opt.classList.remove("selected")),options[idx].classList.add("selected"),selected.textContent=options[idx].textContent}(e.key==="Enter"||e.key===" ")&&dropdown.click(),e.key==="Escape"&&(optionsList.style.display="none",dropdown.setAttribute("aria-expanded","false"))})}function updateQueryStringParameter(uri,key,value){var re=new RegExp("([?&])"+key+"=.*?(&|$)","i"),separator=uri.indexOf("?")!==-1?"&":"?";return uri.match(re)?uri.replace(re,"$1"+key+"="+value+"$2"):uri+separator+key+"="+value}var modalOpeners=document.querySelectorAll('div[role="button"][data-modal]');modalOpeners.forEach(function(el){el.addEventListener("click",function(){var modalId=el.getAttribute("data-modal"),modal=document.getElementById(modalId);modal&&(modal.classList.add("is-open"),modal.setAttribute("aria-hidden","false"))}),el.addEventListener("keydown",function(e){(e.key==="Enter"||e.key===" ")&&el.click()})}),document.querySelectorAll(".schiang-modal__close").forEach(function(btn2){btn2.addEventListener("click",function(e){var modal=btn2.closest(".schiang-modal");modal&&(modal.classList.remove("is-open"),modal.setAttribute("aria-hidden","true")),e.stopPropagation()})}),document.querySelectorAll(".schiang-modal").forEach(function(modal){modal.addEventListener("mousedown",function(e){e.target===modal&&(modal.classList.remove("is-open"),modal.setAttribute("aria-hidden","true"))})});let outerProductsContainer=document.querySelector(".drawer__outer-products"),productsReady=!1;if(outerProductsContainer){let productSections=document.querySelector("product-recommendations.complementary-products.product-recommendations");
1if(productSections){let copyProductSectionsContent2=function(source,outerContainer){const titleWrapper=outerContainer.querySelector(".title-wrapper"),innerProducts=outerContainer.querySelector(".drawer__inner-products");if(!titleWrapper||!innerProducts)return;const heading=source.querySelector(".product-recommendations__heading");heading&&!titleWrapper.querySelector(".product-recommendations__heading")&&titleWrapper.appendChild(heading.cloneNode(!0)),source.querySelectorAll(".card-wrapper").forEach((card,idx)=>{const productId=card.getAttribute("data-product-id")||card.getAttribute("data-product");if(!innerProducts.querySelector(`.collection-product-card[data-product-id="${productId}"]`)){const wrapper=document.createElement("div");wrapper.className="collection-product-card",productId&&wrapper.setAttribute("data-product-id",productId),wrapper.appendChild(card.cloneNode(!0)),innerProducts.appendChild(wrapper)}})};var copyProductSectionsContent=copyProductSectionsContent2;let moveInterval=setInterval(()=>{outerProductsContainer&&productSections&&(copyProductSectionsContent2(productSections,outerProductsContainer),outerProductsContainer.querySelector(".title-wrapper .product-recommendations__heading")&&outerProductsContainer.querySelector(".drawer__inner-products .card-wrapper")&&(clearInterval(moveInterval),productsReady=!0,console.log("Product recommendations moved to drawer")))},500);console.log("Found product recommendation sections:",productSections)}}window.addEventListener("cart-drawer:opened",()=>{if(console.log("Cart drawer opened"),productsReady){console.log("Products already moved, just activating drawer");let productSections=document.querySelector(".drawer__outer-products");productSections.classList.add("active"),setTimeout(()=>{productSections.style.zIndex="100000"},600)}}),window.addEventListener("cart-drawer:closed",()=>{if(console.log("Cart drawer closed"),productsReady){console.log("Products already moved, just deactivating drawer");let productSections=document.querySelector(".drawer__outer-products");productSections.style.zIndex="1000",productSections.classList.remove("active")}})});
2//# sourceMappingURL=/cdn/shop/t/24/assets/onlineplus.js.map?v=138067701080583225721786093709

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.