aboutsummaryrefslogtreecommitdiffstats
path: root/old-apps/frontpage/static/preload.js
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-10-05 14:45:21 +0200
committerivarlovlie <git@ivarlovlie.no>2022-10-05 14:45:21 +0200
commitb7e39b59fd0fc7b5610ebff29035bf622079e0d8 (patch)
tree64be84ebbdac9f7ceced983390c53b10d575af5c /old-apps/frontpage/static/preload.js
parent2001c035fbb417ab0a3d42cfb04d17420bde4086 (diff)
downloadgreatoffice-b7e39b59fd0fc7b5610ebff29035bf622079e0d8.tar.xz
greatoffice-b7e39b59fd0fc7b5610ebff29035bf622079e0d8.zip
refactor: Change file structure
Diffstat (limited to 'old-apps/frontpage/static/preload.js')
-rw-r--r--old-apps/frontpage/static/preload.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/old-apps/frontpage/static/preload.js b/old-apps/frontpage/static/preload.js
deleted file mode 100644
index 379902f..0000000
--- a/old-apps/frontpage/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