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 --- content/journal.md | 4 +++- makenew | Bin 0 -> 15960 bytes style.js | 4 ++++ template.html | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 makenew diff --git a/content/journal.md b/content/journal.md index 227e154..4b0de8e 100644 --- a/content/journal.md +++ b/content/journal.md @@ -1,4 +1,6 @@ -May put shit everyday if I want to, datamining ^_^ +### 13/02/26 + +Nothing to journal about. I've been neglecting the site. :( ### 01/02/26 diff --git a/makenew b/makenew new file mode 100755 index 0000000..0c2df4b Binary files /dev/null and b/makenew differ 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"); + +}); diff --git a/template.html b/template.html index 2da2648..0982f3e 100644 --- a/template.html +++ b/template.html @@ -5,7 +5,7 @@ - + -- cgit v1.2.3