summaryrefslogtreecommitdiff
path: root/style.js
diff options
context:
space:
mode:
authormion <>2026-02-14 15:44:34 +0000
committermion <>2026-02-14 15:44:34 +0000
commitef14f5fef073149f23a9d55cd7393704045e233b (patch)
treef6697c3bd75558e4111ab6b5cc35dd31f7a17c5d /style.js
parent102e0ae2e97cb55665b2547250777f82383ae0a0 (diff)
update stylechooser to update style from cookies without waiting for whole document to load, prevents flash
Diffstat (limited to 'style.js')
-rw-r--r--style.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/style.js b/style.js
index ad66cd0..29ff78a 100644
--- a/style.js
+++ b/style.js
@@ -31,6 +31,8 @@ if (typeof currentstyle === "undefined") {
loadCSS(currentstyle);
}
+document.addEventListener('DOMContentLoaded', function() {
+
var stylechooser = document.createElement("div");
stylechooser.setAttribute("id", "stylechooser");
stylechooser.innerHTML = "Styles: ";
@@ -40,3 +42,5 @@ document.getElementById("content").appendChild(stylechooser);
addCSS("default", "style.css");
addCSS("moe", "moe.css");
addCSS("simple", "simple.css");
+
+});