First Commit. Duplicate bunext-sqlite preset

This commit is contained in:
2026-10-18 16:47:11 +01:00
commit 81e4a8aecc
718 changed files with 41695 additions and 0 deletions
@@ -0,0 +1,24 @@
/**
* Applies the saved color scheme to `<html>` before first paint, so pages
* never flash light before twui's `ColorSchemeSelector` mounts. Mirrors the
* selector's resolution order: `localStorage.theme`, then the OS preference.
*/
const ThemeInitScriptSource = `(function () {
try {
var theme = localStorage.getItem("theme");
if (theme !== "dark" && theme !== "light") {
theme = window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
}
var root = document.documentElement;
root.classList.remove("dark", "light");
root.classList.add(theme);
} catch (e) {}
})();`;
export default function ThemeInitScript() {
return (
<script dangerouslySetInnerHTML={{ __html: ThemeInitScriptSource }} />
);
}