Skip to content

Commit

Permalink
Execute JS on DOMContentLoaded, not load
Browse files Browse the repository at this point in the history
  • Loading branch information
ator-dev committed May 14, 2024
1 parent b1ca934 commit ece77a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addEventListener("load", () => {
document.addEventListener("DOMContentLoaded", () => {
const theme = localStorage.getItem("theme");
if (theme !== null) {
const checkbox = document.getElementById("theme-" + theme);
Expand Down

0 comments on commit ece77a5

Please sign in to comment.