From 37a5159dec959da798f2966f6ab8f422056a8177 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 7 May 2017 23:13:04 +0200 Subject: [PATCH] Revert "Inline style-switching JS into " (re-do) --- public/js/main.js | 6 ++++++ templates/index.html | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 4d5b47d7..657a4909 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,4 +1,10 @@ // Night mode +var night = localStorage.getItem("night"); +if (night == "true") { + $("#style")[0].href = "/css/style-night.css"; + $("#nighticon")[0].src = "/img/sun.png"; +} + function toggleNightMode() { var night = localStorage.getItem("night"); if(night == "true") { diff --git a/templates/index.html b/templates/index.html index eef8f1d1..9b6c3391 100755 --- a/templates/index.html +++ b/templates/index.html @@ -27,15 +27,6 @@ -