fixed text color not updating

This commit is contained in:
ksjdragon 2016-04-20 23:16:21 -04:00
parent b6d2133fcf
commit 13a3cfe3f1
3 changed files with 11 additions and 7 deletions

View File

@ -3,7 +3,6 @@
/* Let's get this party started */ /* Let's get this party started */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 12px; width: 12px;
margin-ri
} }
/* Track */ /* Track */

View File

@ -194,16 +194,18 @@ function makeSettings() {
this.parentNode.style.opacity = "0"; this.parentNode.style.opacity = "0";
setTimeout(function(){k.parentNode.style.display = "none";},300); setTimeout(function(){k.parentNode.style.display = "none";},300);
// Text transition: opacity 0 // Text transition: opacity 0
console.log("hi");
textDiv.parentNode.style.color = themeChart["font"][settings["theme"]].replace(")",",0)").replace("b","ba"); textDiv.parentNode.style.color = themeChart["font"][settings["theme"]].replace(")",",0)").replace("b","ba");
// Update settings through cookie // Update settings through cookie
deleteCookie(setting); deleteCookie(setting);
document.cookie = setting+"="+choices[parseInt(this.className[0])][parseInt(this.className[1])]; document.cookie = setting+"="+choices[parseInt(this.className[0])][parseInt(this.className[1])];
update();
// Text transition: opacity 1 // Text transition: opacity 1
setTimeout(function() { setTimeout(function() {
textDiv.nodeValue = value; textDiv.nodeValue = value;
textDiv.parentNode.style.color = themeChart["font"][settings["theme"]].replace(")",",1)").replace("b","ba"); textDiv.parentNode.style.color = themeChart["font"][settings["theme"]].replace(")",",1)").replace("b","ba");
update();
}, 650) }, 650)
} }
} }
} }

View File

@ -1,19 +1,22 @@
function changeTheme(type) { function changeTheme(type) {
// Changes background image // Changes background image
get("body").style.backgroundImage = "url('./resources/static/" + type +".png')"; get("body").style.backgroundImage = "url('./resources/static/" + type +".png')";
get("body").style.color = themeChart["font"][type];
// Changes interface element colors // Changes interface element colors
for(var i = 0; i < get("pulltab").length; i++) { for(var i = 0; i < get("pulltab").length; i++) {
get("pulltab")[i].style.backgroundColor = themeChart["pulltab"][type]; get("pulltab")[i].style.backgroundColor = themeChart["pulltab"][type];
get("pulltab")[i].style.color = themeChart["font"][settings["theme"]].replace(")",",0)"); get("pulltab")[i].style.color = themeChart["font"][type].replace(")",",0)");
get("pulltab")[i].onmouseover = function() { get("pulltab")[i].onmouseover = function() {
this.style.color = themeChart["font"][settings["theme"]].replace(")",",1)").replace("b","ba"); this.style.color = themeChart["font"][type].replace(")",",1)").replace("b","ba");
} }
get("pulltab")[i].onmouseleave = function() { get("pulltab")[i].onmouseleave = function() {
this.style.color = themeChart["font"][settings["theme"]].replace(")",",0)").replace("b","ba"); this.style.color = themeChart["font"][type].replace(")",",0)").replace("b","ba");
} }
get("sidebar")[i].style.backgroundColor = themeChart["sidebar"][type]; get("sidebar")[i].style.backgroundColor = themeChart["sidebar"][type];
get("body").style.color = themeChart["font"][type]; }
for(var i = 0; i < get("selection").length; i++) {
get("selection")[i].style.color = themeChart["font"][type];
} }
} }