🐛 fix theme color not set correctly on load

Fixes #796 by setting the theme color when the DOM loads
pull/848/head
ItsSunnyMonster 2024-04-01 18:02:33 +13:00 committed by GitHub
parent 50b77b2836
commit c8e11d8e47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ if (document.documentElement.getAttribute("data-auto-appearance") === "true") {
}
window.addEventListener("DOMContentLoaded", (event) => {
setThemeColor();
var switchers = document.querySelectorAll("[id^='appearance-switcher']");
switchers.forEach((switcher) => {
switcher.addEventListener("click", () => {