1// Sticky header 2const header = document.getElementById("siteHeader"); 3const main = document.querySelector("main"); 4 5function toggleStickyHeader() { 6 const scrollTop = window.pageYOffset || document.documentElement.scrollTop; 7 8 if (scrollTop > main.offsetTop + 100) { 9 header.classList.add("go-sticky"); 10 } else { 11 header.classList.remove("go-sticky"); 12 } 13} 14 15window.addEventListener("scroll", toggleStickyHeader); 16 17// Check on page load 18window.addEventListener("load", () => { 19 toggleStickyHeader(); 20});
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.