PageSourceSearch

https://nodesignal.space/theme-init.js?v=1

js nodesignal.space collected 2026-10-02 15:24:50 UTC 643 bytes, 23 lines download raw bytes

1'use strict';
2
3function applySavedTheme(doc, storage) {
4  if (!doc || !doc.documentElement || !storage) return null;
5  try {
6    const saved = storage.getItem('nodesignal-theme');
7    if (saved !== 'light' && saved !== 'dark') return null;
8    doc.documentElement.dataset.theme = saved;
9    return saved;
10  } catch {
11    return null;
12  }
13}
14
15if (typeof document !== 'undefined') {
16  try {
17    applySavedTheme(document, typeof localStorage !== 'undefined' ? localStorage : null);
18  } catch {
19    // Storage kann durch Browserrichtlinien vollständig gesperrt sein.
20  }
21}
22
23if (typeof module !== 'undefined') module.exports = { applySavedTheme };

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.