PageSourceSearch

https://metrorouteatlas.net/js/collapsible.js

js metrorouteatlas.net collected 2026-10-02 22:46:12 UTC 955 bytes, 27 lines download raw bytes

1"use strict";
2
3// Adapted from https://www.w3schools.com/howto/howto_js_collapsible.asp
4function setupCollapsibleElements() {
5    var coll = document.getElementsByClassName("collapsible");
6    var i;
7
8    for (i = 0; i < coll.length; i++) {
9        coll[i].addEventListener("click", function() {
10            this.classList.toggle("collapsible-active");
11            var content = this.nextElementSibling;
12            if (content.style.maxHeight) {
13                content.style.maxHeight = null;
14            } else {
15                content.style.maxHeight = content.scrollHeight + "px";
16            }
17        });
18    }
19}
20
21setupCollapsibleElements();
22
23// Updates the current height of the collapsible div. Call this AFTER changing the text inside.
24function updateCollapsibleElements(el) {
25    var containerDiv = el.parentElement.parentElement.parentElement.parentElement.parentElement;
26    containerDiv.style.maxHeight = containerDiv.scrollHeight + "px";
27}

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.