aboutsummaryrefslogtreecommitdiffstats
path: root/apps/kit/static/preload.js
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-10-03 11:35:20 +0200
committerivarlovlie <git@ivarlovlie.no>2022-10-03 11:35:20 +0200
commitd04692ce4fce4c2085062e02d04d5be4ea37a07c (patch)
tree09f68c3828bc81dd9ae66e99fb768f9711b01ef8 /apps/kit/static/preload.js
parenteaf8f4b212e18e3c34ed4a4ac335fba8cd3a72ac (diff)
downloadgreatoffice-d04692ce4fce4c2085062e02d04d5be4ea37a07c.tar.xz
greatoffice-d04692ce4fce4c2085062e02d04d5be4ea37a07c.zip
refactor: Remove old stuff
Diffstat (limited to 'apps/kit/static/preload.js')
-rw-r--r--apps/kit/static/preload.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/apps/kit/static/preload.js b/apps/kit/static/preload.js
deleted file mode 100644
index 379902f..0000000
--- a/apps/kit/static/preload.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const value = `; ${document.cookie}`;
-const parts = value.split(`; go_theme=`);
-let currentTheme = "system";
-if (parts.length === 2) {
- currentTheme = parts.pop().split(";").shift();
-}
-if (currentTheme === "light") {
- document.querySelector("html").dataset.theme = "light";
-} else if (currentTheme === "dark") {
- document.querySelector("html").dataset.theme = "dark";
-} else {
- document.querySelector("html").dataset.theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
-} \ No newline at end of file