From 06d99f9eab4dca9f52ec4f6a42eeb6cbf3047709 Mon Sep 17 00:00:00 2001 From: Kognise Date: Sat, 6 Apr 2019 14:33:18 -0400 Subject: [PATCH] Misc. style changes --- index.html | 2 +- script.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 92f72a8..f92e895 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ Water.css - + diff --git a/script.js b/script.js index 8017c91..90eab7c 100644 --- a/script.js +++ b/script.js @@ -1,8 +1,8 @@ document.getElementById('switch').addEventListener('click', () => { - const css = document.getElementById('watercss'); - if (css.getAttribute('href') == 'dist/water-dark.css') { - css.setAttribute('href', 'dist/water-light.css') + const stylesheet = document.getElementById('stylesheet') + if (stylesheet.getAttribute('href') === 'dist/water-dark.css') { + stylesheet.setAttribute('href', 'dist/water-light.css') } else { - css.setAttribute('href', 'dist/water-dark.css') + stylesheet.setAttribute('href', 'dist/water-dark.css') } }) \ No newline at end of file