theme editor

This commit is contained in:
Kyle
2020-12-24 17:31:50 -08:00
parent b49ba36450
commit aac1b64898
7 changed files with 140 additions and 23 deletions

20
js/themeEditor.js Normal file
View File

@@ -0,0 +1,20 @@
document.querySelector('#hue-rotate').value = theme.huerotate;
document.querySelector('#hue-rotate-auto').value = theme.rainbow;
document.querySelector('#readable-brightness').value = theme.readablebrightness;
var updateCSSTimer;
var canUpdateCSS = true;
function changeThemeVar(input, destination) {
theme[destination] = input;
localStorage.setItem('theme', JSON.stringify(theme));
// if (canUpdateCSS) {
updateCSS();
// canUpdateCSS = false;
// updateCSSTimer = setTimeout(resetCSSTimer, 50);
// }
}
function resetCSSTimer() {
canUpdateCSS = true;
}