Spaces:
Sleeping
Sleeping
Download static/theme.js from dev-haresh/nexus-ai: direct link, hf CLI and curl.
- Browser
- Download file 514 Bytes
-
https://huggingface.co/spaces/dev-haresh/nexus-ai/resolve/main/static/theme.js
- Command line
-
hf download hf://spaces/dev-haresh/nexus-ai/static/theme.js
-
curl -L -o theme.js https://huggingface.co/spaces/dev-haresh/nexus-ai/resolve/main/static/theme.js
514 Bytes
| let theme = localStorage.getItem("nexus_theme") || "dark"; | |
| function applyTheme(t) { | |
| theme = t; | |
| document.body.className = t; | |
| localStorage.setItem("nexus_theme", t); | |
| } | |
| document.addEventListener("DOMContentLoaded", async () => { | |
| applyTheme(theme); | |
| try { | |
| const res = await fetch("/api/settings", { credentials: "include" }); | |
| if (res.ok) { | |
| const data = await res.json(); | |
| if (data.settings && data.settings.theme) { | |
| applyTheme(data.settings.theme); | |
| } | |
| } | |
| } catch {} | |
| }); | |