diff options
| author | mion <> | 2026-02-14 15:44:34 +0000 |
|---|---|---|
| committer | mion <> | 2026-02-14 15:44:34 +0000 |
| commit | ef14f5fef073149f23a9d55cd7393704045e233b (patch) | |
| tree | f6697c3bd75558e4111ab6b5cc35dd31f7a17c5d | |
| parent | 102e0ae2e97cb55665b2547250777f82383ae0a0 (diff) | |
update stylechooser to update style from cookies without waiting for whole document to load, prevents flash
| -rw-r--r-- | content/journal.md | 4 | ||||
| -rwxr-xr-x | makenew | bin | 0 -> 15960 bytes | |||
| -rw-r--r-- | style.js | 4 | ||||
| -rw-r--r-- | template.html | 2 |
4 files changed, 8 insertions, 2 deletions
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 @@ -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 @@ <meta charset="UTF-8"> <link id="mainstyle" rel="stylesheet" href="style.css"> <link rel="stylesheet" href="etc.css"> - <script src="style.js" defer></script> + <script src="style.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> |
