summaryrefslogtreecommitdiff
path: root/public/static/js
diff options
context:
space:
mode:
authormarudor <marudor@marudor.de>2019-05-16 16:10:53 +0200
committermarudor <marudor@marudor.de>2019-05-16 16:10:53 +0200
commit84b32b28e9f1da6576e4864a0f374b341a2c9920 (patch)
treed6bd27263aa3117c9368d3005fe27519f4793247 /public/static/js
parent87e74ca90d4c13758461f380b00ed83b5a287da9 (diff)
Further color improvements
Diffstat (limited to 'public/static/js')
-rw-r--r--public/static/js/theme.js12
-rw-r--r--public/static/js/theme.min.js1
2 files changed, 0 insertions, 13 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');
-}
diff --git a/public/static/js/theme.min.js b/public/static/js/theme.min.js
deleted file mode 100644
index 975a76e..0000000
--- a/public/static/js/theme.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var validThemes=["dark.min","light.min"],currentTheme=localStorage.getItem("theme");function toggleTheme(){currentTheme="dark.min"===currentTheme?"light.min":"dark.min",localStorage.setItem("theme",currentTheme),addStyleSheet(currentTheme,"theme")}validThemes.includes(currentTheme)||(currentTheme=window.matchMedia("(prefers-color-scheme: dark").matches?"dark.min":"light.min"),addStyleSheet(currentTheme,"theme");