PageSourceSearch

https://www.knowbe4.com/hubfs/hub_generated/module_assets/1/184927…/module_sticky-anchor-sidebar-legal.min.js

js knowbe4.com collected 2026-09-24 08:26:00 UTC 1,268 bytes, 2 lines download raw bytes

1var module_184927752489=function(){let lastScrollTop=0,currentSectionId=null;const handleStickyScroll=()=>{const sticky=document.querySelector(".sticky"),st=window.scrollY;st>lastScrollTop||st<385?sticky?.classList.remove("scrolled"):sticky?.classList.add("scrolled"),lastScrollTop=Math.max(0,st)};document.addEventListener("DOMContentLoaded",()=>{const sections=document.querySelectorAll(".section[id]"),tocLinks=document.querySelectorAll(".sidebar a");window.addEventListener("scroll",handleStickyScroll,{passive:!0}),window.addEventListener("scroll",()=>((sections,tocLinks)=>{let closestSection=null,closestDistance=1/0;if(sections.forEach(section=>{const distance=section.getBoundingClientRect().top;Math.abs(distance)<closestDistance&&(closestDistance=Math.abs(distance),closestSection=section)}),closestSection){const id=closestSection.getAttribute("id");id!==currentSectionId&&(currentSectionId=id,tocLinks.forEach(link=>{link.getAttribute("href")===`#${id}`?link.classList.add("active"):link.classList.remove("active")}),history.replaceState(null,null,`#${id}`))}})(sections,tocLinks))})}();
2//# sourceURL=https://241394.fs1.hubspotusercontent-na1.net/hubfs/241394/hub_generated/module_assets/1/184927752489/1781188073336/module_sticky-anchor-sidebar-legal.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.