PageSourceSearch

https://treedfilaments.com/scripts/utils/dom-helpers.js

js treedfilaments.com collected 2026-10-06 04:54:03 UTC 744 bytes, 20 lines download raw bytes

1export const toggleClasses = (element, add, remove) => {
2    remove.forEach((cls) => element.classList.remove(cls));
3    add.forEach((cls) => element.classList.add(cls));
4};
5export const removeElements = (selector) => {
6    document.querySelectorAll(selector).forEach((el) => el.remove());
7};
8export const setElementText = (id, text) => {
9    const el = document.getElementById(id);
10    if (el)
11        el.textContent = text;
12};
13export const showElement = (id) => {
14    var _a;
15    (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.classList.remove("hidden");
16};
17export const hideElement = (id) => {
18    var _a;
19    (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.classList.add("hidden");
20};

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.