PageSourceSearch

https://blog.smartgyro.com/hubfs/hub_generated/template_assets/1/7…/template_pwr-sticky-sub-menu.min.js

js smartgyro.com collected 2026-10-04 13:26:02 UTC 3,380 bytes, 2 lines download raw bytes

1pwr.dom.ready(()=>{var pwrStickySubMenu=document.querySelector("#pwr-js-sticky-sub-menu");if(!pwrStickySubMenu)return;const fixedHeader=document.querySelector("#pwr-header-fixed"),isFixedHeader=(document.querySelector("#pwr-header-top"),null!=fixedHeader),pwrStickySubMenuPlaceholder=document.querySelector("#pwr-js-sticky-sub-menu--placeholder"),pwrStickySubMenuLinks=document.querySelectorAll(".pwr-sticky-sub-menu__link");var orgPos=pwrStickySubMenu.offsetTop,fixedHeaderOuterHeight=0;function refreshHeights(){matchHeight.match(Array.from(document.querySelectorAll(".pwr-sticky-sub-menu--match-height")))}function configurePlaceholder(){const sSub=document.getElementById("pwr-js-sticky-sub-menu");document.getElementById("pwr-js-sticky-sub-menu--placeholder").style.height=sSub.getBoundingClientRect().height+"px",refreshHeights()}function scrollHandler(){var scrollPos=window.pageYOffset;if(scrollPos<=orgPos-0-fixedHeaderOuterHeight&&scrollPos>=-100)pwrStickySubMenu.style.top="auto",pwrStickySubMenu.classList.remove("scroll"),pwrStickySubMenuPlaceholder.classList.remove("scroll"),pwrStickySubMenuLinks.forEach(e=>e.classList.remove("pwr-sticky-sub-menu__link--active"));else{pwrStickySubMenu.style.top=0,isFixedHeader&&(pwrStickySubMenu.style.top=fixedHeaderOuterHeight+"px"),pwrStickySubMenu.classList.add("scroll"),pwrStickySubMenuPlaceholder.classList.add("scroll");var targetListScrolledPast=pwrStickySubMenuTargetList.filter(e=>e.getBoundingClientRect().top<0),targetLast=targetListScrolledPast[targetListScrolledPast.length-1],targetLastId=targetLast?targetLast.getAttribute("id"):"";pwrStickySubMenuLinks.forEach(e=>e.getAttribute("href")=="#"+targetLastId?e.classList.add("pwr-sticky-sub-menu__link--active"):e.classList.remove("pwr-sticky-sub-menu__link--active"))}}pwrStickySubMenuTargetList=Array.from(pwrStickySubMenuLinks).map(e=>document.querySelector(e.getAttribute("href"))).filter(e=>null!=e),configurePlaceholder(),refreshHeights(),window.addEventListener("resize",configurePlaceholder),document.querySelectorAll(".pwr-anchor").forEach(e=>e.classList.add("pwr-anchor--sticky-sub-menu")),isFixedHeader&&(fixedHeaderOuterHeight=pwr.vanilla.getOuterHeight(fixedHeader)),window.addEventListener("scroll",scrollHandler),scrollHandler();var btnStickySubmenu=document.querySelector("#pwr-js-sticky-sub-menu__btn");function progressBar(){var max,value,progressBar=document.querySelector("#pwr-js-sticky-sub-menu__progress-bar");max=document.body.offsetHeight-window.innerHeight,progressBar.setAttribute("max",max),value=window.scrollY||document.documentElement.scrollTop,progressBar.setAttribute("value",value)}btnStickySubmenu.addEventListener("click",function(e){e.preventDefault(),pwrStickySubMenu.classList.contains("pwr-sticky-sub-menu--mobile-open")?(pwrStickySubMenu.classList.remove("pwr-sticky-sub-menu--mobile-open"),btnStickySubmenu.classList.remove("pwr-sticky-sub-menu__btn--open")):(pwrStickySubMenu.classList.add("pwr-sticky-sub-menu--mobile-open"),btnStickySubmenu.classList.add("pwr-sticky-sub-menu__btn--open"))}),document.querySelector("#pwr-js-sticky-sub-menu__progress-bar")&&(window.addEventListener("scroll",progressBar),window.addEventListener("resize",progressBar))});
2//# sourceURL=https://25853954.fs1.hubspotusercontent-eu1.net/hubfs/25853954/hub_generated/template_assets/1/72029606599/1789563464777/template_pwr-sticky-sub-menu.js

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.