mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
theme editor
This commit is contained in:
20
js/themeEditor.js
Normal file
20
js/themeEditor.js
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user