PageSourceSearch

https://saltire.com/resources/homepage-header-scroll.js

js saltire.com collected 2026-09-24 10:07:58 UTC 420 bytes, 15 lines download raw bytes

1const header = document.querySelector('.sticky-header');
2let scrollPosition = window.scrollY;
3
4if (scrollPosition === 0) {
5    header.classList.add('transparent-header');
6}
7
8window.addEventListener('scroll', function() {
9    scrollPosition = window.scrollY;
10    if (scrollPosition === 0) {
11        header.classList.add('transparent-header');
12    } else {
13        header.classList.remove('transparent-header');
14    }
15});

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.