forked from GithubMirrors/cardconjurer
20 lines
565 B
JavaScript
20 lines
565 B
JavaScript
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;
|
|
} |