summaryrefslogtreecommitdiff
path: root/public/static/js/theme.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/static/js/theme.js')
-rw-r--r--public/static/js/theme.js12
1 files changed, 0 insertions, 12 deletions
diff --git a/public/static/js/theme.js b/public/static/js/theme.js
deleted file mode 100644
index 71fb6ae..0000000
--- a/public/static/js/theme.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var validThemes = ['dark.min', 'light.min'];
-var currentTheme = localStorage.getItem('theme');
-if (!validThemes.includes(currentTheme)) {
- currentTheme = window.matchMedia('(prefers-color-scheme: dark').matches ? 'dark.min' : 'light.min';
-}
-addStyleSheet(currentTheme, 'theme');
-
-function toggleTheme() {
- currentTheme = currentTheme === 'dark.min' ? 'light.min' : 'dark.min';
- localStorage.setItem('theme', currentTheme);
- addStyleSheet(currentTheme, 'theme');
-}