Clean up pad JS formatting, debug messages

pull/196/head
Matt Baer 4 years ago
parent 638059a26b
commit 121d83d94d
  1. 11
      templates/pad.tmpl

@ -72,9 +72,8 @@
setTheme('light');
}
H.set('padTheme', newTheme);
console.log('here');
}
function setTheme(newTheme) {
document.body.classList.remove('light');
document.body.classList.remove('dark');
@ -101,10 +100,12 @@
setTheme('dark');
} else {
const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches
if (isDarkMode) setTheme('dark');
else setTheme('light');
if (isDarkMode) {
setTheme('dark');
} else {
setTheme('light');
}
}
var $writer = H.getEl('writer');
var $btnPublish = H.getEl('publish');

Loading…
Cancel
Save