PageSourceSearch

https://cobble.jp/cdn/shop/t/18/assets/sticky-header.js?v=32098283428163199611785226881

js cobble.jp collected 2026-10-05 10:45:06 UTC 2,353 bytes, 2 lines download raw bytes

1customElements.get("sticky-header")||customElements.define("sticky-header",class extends HTMLElement{constructor(){super()}connectedCallback(){this.header=document.getElementById(this.dataset.stickyElementId)?document.getElementById(this.dataset.stickyElementId):this.parentNode,this.siteHeader=document.getElementById("site-header"),this.headerBounds={},this.currentScrollTop=0,this.firstSectionInMain=document.getElementById("MainContent").firstElementChild,this.offsetPosition=this.siteHeader.offsetHeight+this.firstSectionInMain.offsetHeight,this.onScrollHandler=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}disconnectedCallback(){window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()}).observe(this.header)}onScroll(){const scrollTop=window.scrollY||document.documentElement.scrollTop;scrollTop>this.currentScrollTop&&scrollTop>this.offsetPosition?requestAnimationFrame(this.scrolledPast.bind(this)):scrollTop<this.currentScrollTop&&scrollTop>this.offsetPosition?requestAnimationFrame(this.scrollingUp.bind(this)):scrollTop<=0&&requestAnimationFrame(this.reset.bind(this)),this.currentScrollTop=scrollTop}scrolledPast(){this.header.classList.add("scrolled-past","sticky","motion-reduce"),this.closeMenuDisclosure(),this.closeSearchModal(),!(this.dataset.transparentHeader==="true"&&this.dataset.template==="index")&&(document.getElementById("MainContent").style.paddingTop=`${this.siteHeader.offsetHeight}px`)}scrollingUp(){this.header.classList.add("sticky","scrolling-up","motion-reduce"),this.header.classList.remove("scrolled-past")}reset(){this.header.classList.remove("scrolled-past","sticky","scrolling-up"),!(this.dataset.transparentHeader==="true"&&this.dataset.template==="index")&&(document.getElementById("MainContent").style.paddingTop="0")}closeMenuDisclosure(){this.disclosures=this.disclosures||this.siteHeader.querySelectorAll("details-disclosure"),this.disclosures.forEach(disclosure=>disclosure.close())}closeSearchModal(){this.searchModal=this.searchModal||this.siteHeader.querySelector("details-modal"),this.searchModal.close(!1)}});
2//# sourceMappingURL=/cdn/shop/t/18/assets/sticky-header.js.map?v=32098283428163199611785226881

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.