PageSourceSearch

https://epionline.org/wp-content/themes/epionline2025/blocks/site-header/site-header.js?ver=2025-05-27-03

js epionline.org collected 2026-10-02 05:37:20 UTC 768 bytes, 17 lines download raw bytes

1// Assuming site header is fixed, add a class to indicate when it's "stuck"
2const siteHeader = document.querySelector(".wp-block-site-header");
3const siteHeaderPinnedThreshold = 65; // threshold in pixels that we'll switch to pinned
4let siteHeaderScrollTimeoutId = 0;
5window.addEventListener(
6    "scroll",
7    () => {
8        siteHeaderScrollTimeoutId && window.cancelAnimationFrame(siteHeaderScrollTimeoutId);
9        siteHeaderScrollTimeoutId = window.requestAnimationFrame(() => {
10            siteHeader.classList.toggle("wp-block-site-header--is-pinned", window.scrollY > siteHeaderPinnedThreshold);
11        });
12    },
13    false
14);
15
16// Check on page load
17siteHeader.classList.toggle("wp-block-site-header--is-pinned", window.scrollY > siteHeaderPinnedThreshold);

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.