PageSourceSearch

https://clspectrum.com/scripts/PV%20Sites/searchIconFixed.js

js clspectrum.com collected 2026-10-02 04:15:46 UTC 847 bytes, 26 lines download raw bytes

1// JavaScript Document
2document.addEventListener("DOMContentLoaded", function () {
3  var sicon = document.getElementById("menuSearch");
4  var secondaryNav = document.getElementById("secondaryNav");
5
6  function updateIconClass() {
7    var secondaryNavRect = secondaryNav.getBoundingClientRect();
8    if (secondaryNavRect.top <= 0) {
9      sicon.classList.add("fixed-icon");
10      secondaryNav.classList.add("secondary-scrolled");
11    } else {
12      // Check if the user has scrolled back to 145px from the top
13      if (window.scrollY <= 145) {
14        sicon.classList.remove("fixed-icon");
15        secondaryNav.classList.remove("secondary-scrolled");
16      }
17    }
18  }
19
20  // Check initial scroll position on page load
21  updateIconClass();
22
23  window.addEventListener("scroll", function () {
24    updateIconClass();
25  });
26});

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.