From ef14f5fef073149f23a9d55cd7393704045e233b Mon Sep 17 00:00:00 2001 From: mion <> Date: Sat, 14 Feb 2026 15:44:34 +0000 Subject: update stylechooser to update style from cookies without waiting for whole document to load, prevents flash --- style.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'style.js') 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"); + +}); -- cgit v1.2.3