PageSourceSearch

https://www.statelinetack.com/cdn/shop/t/10/assets/sticky-header.js?v=110265659224262499761761676450

js statelinetack.com collected 2026-10-01 12:13:19 UTC 2,239 bytes, 2 lines download raw bytes

1customElements.get("sticky-header")||customElements.define("sticky-header",class extends HTMLElement{constructor(){super()}connectedCallback(){this.header=document.querySelector(".section-header"),this.alwaysSticky=this.dataset.alwaysOn==="true",this.headerBounds={},this.currentScrollTop=0,this.preventReveal=!1,this.predictiveSearch=this.querySelector("predictive-search"),this.alwaysSticky&&this.header.classList.add("section-header-sticky-always"),this.onScrollHandler=this.onScroll.bind(this),this.hideHeaderOnScrollUp=()=>{this.preventReveal=!0},this.addEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}disconnectedCallback(){this.removeEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()}).observe(this.header)}onScroll(){const scrollTop=window.pageYOffset||document.documentElement.scrollTop;this.predictiveSearch&&this.predictiveSearch.isOpen||(scrollTop>this.currentScrollTop&&scrollTop>this.headerBounds.bottom?requestAnimationFrame(this.hide.bind(this)):scrollTop<this.currentScrollTop&&scrollTop>this.headerBounds.bottom?this.preventReveal?(window.clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.preventReveal=!1},66),requestAnimationFrame(this.hide.bind(this))):requestAnimationFrame(this.reveal.bind(this)):scrollTop<=this.headerBounds.top&&requestAnimationFrame(this.reset.bind(this)),this.currentScrollTop=scrollTop)}hide(){this.alwaysSticky||(this.header.classList.add("section-header-hidden","section-header-sticky"),this.closeHeaderDropdowns())}reveal(){this.alwaysSticky||(this.header.classList.add("section-header-sticky","animate"),this.header.classList.remove("section-header-hidden"))}reset(){this.header.classList.remove("section-header-hidden","section-header-sticky","animate")}closeHeaderDropdowns(){this.header.querySelectorAll("localization-form").forEach(dropdown=>{dropdown.hidePanel()})}});
2//# sourceMappingURL=/cdn/shop/t/10/assets/sticky-header.js.map?v=110265659224262499761761676450

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.