PageSourceSearch

https://xn--schildkrten-yfb.de/cdn/shop/t/9/assets/infinite-scroll.js?v=94048195506395265881775037188

js xn--schildkrten-yfb.de collected 2026-10-02 20:14:20 UTC 3,519 bytes, 2 lines download raw bytes

1if(!customElements.get("infinite-scroll")){class InfiniteScroll extends HTMLElement{constructor(){super(),this.init()}disconnectedCallback(){this.destroy()}init(){this.paginationContainer=this.querySelector(".js-pagination"),this.paginationItems=this.querySelectorAll(".js-pagination__item"),this.nextButton=this.querySelector(".js-pagination__next-button"),!(!this.paginationContainer||!this.paginationItems.length||!this.nextButton.hasAttribute("href"))&&this.bindListeners()}destroy(){clearInterval(this.nextButtonTimer),this.nextButton?.removeEventListener("click",this.clickHandler),this.intersectionObserver?.disconnect()}onNextButtonClick(event){event.preventDefault(),this.fetchNextItems()}bindListeners(){this.clickHandler=this.onNextButtonClick.bind(this),this.nextButton.addEventListener("click",this.clickHandler),this.dataset.infiniteScrollEnabled==="true"&&(this.intersectionObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?(this.fetchNextItems(),this.nextButtonTimer=setInterval(this.fetchNextItems.bind(this),1500)):clearInterval(this.nextButtonTimer)})},{rootMargin:`${window.innerHeight}px 0px`}),this.intersectionObserver.observe(this.paginationContainer))}async fetchNextItems(){if(this.fetchInProgress)return;let originalButtonText=this.nextButton.textContent;this.fetchInProgress=!0,this.nextButton.setAttribute("aria-disabled","true"),this.nextButton.textContent=window.strings.general.pagination.loadingText;try{const response=await fetch(this.nextButton.href);if(!response.ok)throw new Error(`Failed to fetch: ${response.statusText}`);const template=document.createElement("template");template.innerHTML=await response.text();const newItemsHTML=Array.from(template.content.querySelectorAll(".js-pagination__item")).map(item=>item.outerHTML).join("");this.paginationItems[this.paginationItems.length-1].insertAdjacentHTML("afterend",newItemsHTML);const lastIndex=this.paginationItems.length;this.paginationItems=this.querySelectorAll(".js-pagination__item"),setTimeout(()=>{typeof initializeScrollAnimationTrigger=="function"&&initializeScrollAnimationTrigger(),window.renderSelects(),window.loadDesktopOnlyTemplates(),window.stickersReinit?.(),document.body.classList.contains("tab-active")&&window.theme?.settings.paginationLoadType==="show_more"&&this.paginationItems[lastIndex]?.querySelector("a")?.focus()},300),this.updatePaginationControls(template)}catch(error){console.error("Failed to load new items:",error)}finally{this.fetchInProgress=!1,this.nextButton.removeAttribute("aria-disabled"),this.nextButton.textContent=originalButtonText}}updatePaginationControls(template){const nextPagination=template.content.querySelector(".js-pagination");nextPagination&&nextPagination.querySelector(".js-pagination__next-button[href]")?(this.paginationContainer.innerHTML=nextPagination.innerHTML,this.refreshNextButton()):this.cleanupAfterLastPage()}refreshNextButton(){this.nextButton.removeEventListener("click",this.clickHandler),this.nextButton=this.querySelector(".js-pagination__next-button"),this.nextButton.addEventListener("click",this.clickHandler)}cleanupAfterLastPage(){this.intersectionObserver&&this.intersectionObserver.disconnect(),clearInterval(this.nextButtonTimer),this.paginationContainer.remove(),document.querySelectorAll(".js-when-paginated-only").forEach(elem=>elem.remove())}}customElements.define("infinite-scroll",InfiniteScroll)}
2//# sourceMappingURL=/cdn/shop/t/9/assets/infinite-scroll.js.map?v=94048195506395265881775037188

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.