PageSourceSearch

https://isthmus.com/api/design-e82d3ea74a5ef67e46a15580e59eb554/option.js

js isthmus.com collected 2026-10-02 03:47:28 UTC 3,194 bytes, 112 lines download raw bytes

1(() => {
2
3  const moveChickletsToFooter = () => {
4    const chicklets = document.querySelector("#logo .chicklets");
5    const copyright = document.querySelector('#copyright');
6    if (chicklets && copyright) {
7      copyright.parentNode.insertBefore(chicklets, copyright);
8    }
9  };
10
11  const addMoveListener = () => {
12    moveChickletsToFooter();
13  };
14
15  const winLoad = callback => {
16    if (document.readyState === "complete") {
17      callback();
18    } else {
19      window.addEventListener("load", callback);
20    }
21  };
22
23  winLoad(addMoveListener);
24})();
25(() => {
26  const moveSearchBarToMainNav = () => {
27    const mainNav = document.querySelector('#topnav .mainnav');
28    const searchBar = document.getElementById('mp-search-bar')
29      ? document.getElementById('mp-search-bar')
30      : document.getElementById('CSE');
31
32    // only move it if it's not there already
33    if (searchBar && searchBar.parentElement !== mainNav) {
34      mainNav.insertBefore(searchBar, mainNav.lastChild);
35    }
36  };
37
38  const moveSearchBarBack = () => {
39    const logo = document.querySelector('#logo');
40    const searchBar = document.getElementById('mp-search-bar')
41      ? document.getElementById('mp-search-bar')
42      : document.getElementById('CSE');
43    if (searchBar) {
44      logo.insertBefore(searchBar, logo.firstChild);
45    }
46  };
47
48  const checkMove = () => {
49    const mql = window.matchMedia('(max-width: 48em)');
50    if (mql.matches) {
51      moveSearchBarToMainNav();
52    } else {
53      moveSearchBarBack();
54    }
55  };
56
57  const foldSearchIntoNav = () => {
58    window.addEventListener('resize', checkMove);
59    checkMove();
60  };
61
62  const winLoad = (callback) => {
63    if (document.readyState === 'complete') {
64      callback();
65    } else {
66      window.addEventListener('load', callback);
67    }
68  };
69  winLoad(foldSearchIntoNav);
70})();
71(() => {
72  const registerFixedNav = () => {
73    const nav = document.querySelector('#topnav');
74    const topOfNav = nav.offsetTop;
75    const mobileLogoLink = document.createElement('a');
76    const logoToCopy = document.querySelector('link[rel="shortcut icon"]');
77
78    const stickyLogo = document.createElement('img');
79    stickyLogo.setAttribute('alt', 'Home');
80    if (logoToCopy) {
81      stickyLogo.setAttribute('src', logoToCopy.href);
82      stickyLogo.setAttribute('width', 50);
83      stickyLogo.setAttribute('height', 50);
84      mobileLogoLink.append(stickyLogo);
85    }
86    mobileLogoLink.setAttribute('href', document.querySelector('#logo a[rel="home"]').href);
87    mobileLogoLink.classList.add('mp-sticky-logo');
88    // remove existing sticky logo
89    const oldStickyLogo = nav.querySelector('a.mp-sticky-logo');
90    if (oldStickyLogo) nav.removeChild(oldStickyLogo);
91    nav.insertBefore(mobileLogoLink, nav.firstChild);
92
93    const fixNav = () => {
94      if (window.scrollY >= topOfNav) {
95        nav.classList.add('fixed');
96      } else {
97        nav.classList.remove('fixed');
98      }
99    };
100    window.addEventListener('scroll', fixNav);
101  };
102
103  const winLoad = (callback) => {
104    if (document.readyState === 'complete') {
105      callback();
106    } else {
107      window.addEventListener('load', callback);
108    }
109  };
110
111  winLoad(registerFixedNav);
112})();

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.