()
| 10 | |
| 11 | // Get the preferred theme from localStorage or system preference |
| 12 | function getPreferredTheme() { |
| 13 | const saved = localStorage.getItem(THEME_STORAGE_KEY); |
| 14 | if (saved) return saved; |
| 15 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; |
| 16 | } |
| 17 | |
| 18 | // Apply theme and update UI |
| 19 | function applyTheme(theme) { |
no outgoing calls
no test coverage detected
searching dependent graphs…