Skip to content

Commit

Permalink
🐛 fix theme color not set correctly on load
Browse files Browse the repository at this point in the history
Fixes #796 by setting the theme color when the DOM loads
  • Loading branch information
ItsSunnyMonster authored Apr 1, 2024
1 parent 50b77b2 commit c8e11d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down

0 comments on commit c8e11d8

Please sign in to comment.