PageSourceSearch

https://albertslundbibliotek.dk/themes/custom/novel/assets/dpl-design-system/js/init-nav-grid.js?tm82pm

js albertslundbibliotek.dk collected 2026-10-02 11:58:59 UTC 677 bytes, 26 lines download raw bytes

1window.addEventListener("load", () => {
2  const grids = document.querySelectorAll(
3    ".nav-grid--has-many:not(.is-initialized)",
4  );
5
6  grids.forEach((grid) => {
7    grid.classList.add("is-initialized");
8    const button = grid.querySelector(".nav-grid__controller");
9
10    if (!button) {
11      return;
12    }
13
14    const firstHiddenLink = Array.from(grid.querySelectorAll(".nav-grid__item"))
15      .find((item) => window.getComputedStyle(item).display === "none")
16      ?.querySelector("a");
17
18    button.addEventListener("click", () => {
19      grid.classList.remove("nav-grid--folded");
20
21      if (firstHiddenLink) {
22        firstHiddenLink.focus();
23      }
24    });
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.