From fc49a48af61a7f823d3df5e6e362e23736871d93 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 18 Mar 2018 10:36:44 -0400 Subject: [PATCH] Trying inline JS to set dark mode faster --- darkmode.js | 4 ++-- stroll.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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 @@ +