()
| 535 | } |
| 536 | |
| 537 | function toggleTheme() { |
| 538 | currentTheme = currentTheme === "light" ? "dark" : "light" |
| 539 | applyTheme(currentTheme) |
| 540 | localStorage.setItem("theme", currentTheme) |
| 541 | } |
| 542 | |
| 543 | function applyTheme(theme) { |
| 544 | document.documentElement.setAttribute("data-theme", theme) |
nothing calls this directly
no test coverage detected