PageSourceSearch

https://www.doversaddlery.com/cdn/shop/t/4/assets/sticky-scroller.js?v=131845997655769655981759511047

js doversaddlery.com collected 2026-10-01 11:27:28 UTC 2,138 bytes, 2 lines download raw bytes

1if(!customElements.get("sticky-scroller")){class StickyScroller extends HTMLElement{constructor(){super(),this.headerHeight=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"),10)+parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-offset"),10),this.parent=this.closest(".sticky-scroller--parent"),this.newScrollPosition=0,this.oldScrollPositon=0,this.ticking=!1}connectedCallback(){this.parent&&(this.element=this.querySelector(".sticky-scroller--element"),this.siblings=this.parent.querySelectorAll(".sticky-scroller--compare"),this.collapsibles=this.parent.querySelectorAll(".accordion"),window.addEventListener("resize",this.onResize.bind(this)),window.addEventListener("scroll",this.onScroll.bind(this),{passive:!0}),window.dispatchEvent(new Event("resize")),this.collapsibles.length&&this.collapsibles.forEach(collapsible=>{collapsible.addEventListener("animationend",()=>{this.onResize()})}))}getSiblingsHeight(){return this.disable(!1),this.siblingHeight=0,this.siblings.forEach(sibling=>{this.siblingHeight+=sibling.offsetHeight}),this.siblingHeight}onResize(){this.getSiblingsHeight()&&(this.getSiblingsHeight()<=this.element.offsetHeight?this.disable(!0):this.activate())}onScroll(){this.newScrollPosition=window.scrollY,this.ticking||(window.requestAnimationFrame(()=>{this.translate(),this.ticking=!1,this.oldScrollPositon=this.newScrollPosition}),this.ticking=!0)}activate(){this.element.style.overflowY="hidden",this.element.classList.remove("sticky-scroller--disabled"),this.ticking=!1,window.dispatchEvent(new Event("scroll"))}disable(scroll){scroll&&(this.element.style.overflowY="auto"),this.element.classList.add("sticky-scroller--disabled")}translate(){const parentRect=this.parentElement.getBoundingClientRect(),distance=this.newScrollPosition-this.oldScrollPositon;parentRect.top>this.headerHeight&&distance>0||parentRect.bottom<window.innerHeight&&distance<0||(this.element.scrollTop+=distance)}}customElements.define("sticky-scroller",StickyScroller)}
2//# sourceMappingURL=/cdn/shop/t/4/assets/sticky-scroller.js.map?v=131845997655769655981759511047

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.