PageSourceSearch

https://ricardo-rehfeldt.de/theme-init.js?v=20260707c

js ricardo-rehfeldt.de collected 2026-10-09 04:02:27 UTC 450 bytes, 11 lines download raw bytes

1// No-flash theme init: saved preference > system > dark default.
2// Loaded synchronously in <head> so the theme is set before first paint.
3(() => {
4    try {
5        const saved = localStorage.getItem("theme");
6        const sys = matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark";
7        document.documentElement.dataset.theme = saved || sys;
8    } catch {
9        document.documentElement.dataset.theme = "dark";
10    }
11})();

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.