Download src/lib/switchTheme.ts from aminbashi/sidekick: direct link, hf CLI and curl.
- Browser
- Download file 158 Bytes
-
https://huggingface.co/spaces/aminbashi/sidekick/resolve/main/src/lib/switchTheme.ts
- Command line
-
hf download hf://spaces/aminbashi/sidekick/src/lib/switchTheme.ts
-
curl -L -o switchTheme.ts https://huggingface.co/spaces/aminbashi/sidekick/resolve/main/src/lib/switchTheme.ts
158 Bytes
| export function switchTheme() { | |
| const { classList } = document.querySelector("html") as HTMLElement; | |
| classList.add("dark"); | |
| localStorage.theme = "dark"; | |
| } | |