Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/kasper9n/taskler. Simple text editor for your New Tab page taskler.kasper.space
Something went wrong. Try again.
123456789101112131415function detectTheme() { var themeOverride = localStorage.getItem('theme'); if (themeOverride === 'dark' || themeOverride === 'light') { // Override the system theme return themeOverride; } else if (window.matchMedia('(prefers-color-scheme: light)').matches) { // Use the system theme return 'light'; } else { // Default theme return 'dark'; }}document.documentElement.setAttribute('data-theme', detectTheme());