diff --git a/darkmode.js b/darkmode.js index 9341d05..d203802 100644 --- a/darkmode.js +++ b/darkmode.js @@ -19,7 +19,7 @@ function setDarkMode(darkMode) { } } -window.addEventListener('load', function(event) { +function loadDarkMode() { (function() { let storage = window.localStorage; @@ -28,4 +28,4 @@ window.addEventListener('load', function(event) { setDarkMode(storage.getItem("dark-mode") === "true"); } }()); -}); +}; diff --git a/stroll.html b/stroll.html index d8da9e0..50c916a 100644 --- a/stroll.html +++ b/stroll.html @@ -21,6 +21,7 @@ +