From 121d83d94dc455158e2843e177f02ed6182ff9c4 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 11 Aug 2020 09:27:50 -0400 Subject: [PATCH] Clean up pad JS formatting, debug messages --- templates/pad.tmpl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/pad.tmpl b/templates/pad.tmpl index 0b04e6e..9c7020c 100644 --- a/templates/pad.tmpl +++ b/templates/pad.tmpl @@ -72,15 +72,14 @@ setTheme('light'); } H.set('padTheme', newTheme); - console.log('here'); - } - function setTheme(newTheme){ + + function setTheme(newTheme) { document.body.classList.remove('light'); document.body.classList.remove('dark'); document.body.classList.add(newTheme); var btns = Array.prototype.slice.call(document.getElementById('tools').querySelectorAll('a img')); - if (newTheme == 'light'){ + if (newTheme == 'light') { // check if current theme is dark otherwise we'll get `_dark_dark@2x.png` if (H.get('padTheme', 'auto') == 'dark'){ for (var i=0; i