Stempelfarbe passt sich dem Likestatus an

This commit is contained in:
clerie 2018-06-29 10:07:11 +02:00
parent 7cf80d38d8
commit cbebbdb817
2 changed files with 13 additions and 6 deletions

View File

@ -23,10 +23,7 @@
], ],
"web_accessible_resources": [ "web_accessible_resources": [
"media/stempel-witzig.png", "media/*"
"media/stempel-witzig-disabled.png",
"media/stempel-nicht-witzig.png",
"media/stempel-nicht-witzig-disabled.png"
] ]
} }

View File

@ -54,9 +54,19 @@ function inject() {
log("Stempelfläche vergrößert."); log("Stempelfläche vergrößert.");
var image_container_object = document.querySelectorAll(image_container_path); var image_container_object = document.querySelectorAll(image_container_path);
log("Packe Stempel aus..."); log("Packe Stempel aus...");
if(container_object[0].classList.contains('style-default-active')) {
inject_image(image_container_object[0], getURL("media/stempel-witzig.png")); inject_image(image_container_object[0], getURL("media/stempel-witzig.png"));
}
else {
inject_image(image_container_object[0], getURL("media/stempel-witzig-disabled.png"));
}
log("Witzig!"); log("Witzig!");
if(container_object[1].classList.contains('style-default-active')) {
inject_image(image_container_object[1], getURL("media/stempel-nicht-witzig.png")); inject_image(image_container_object[1], getURL("media/stempel-nicht-witzig.png"));
}
else {
inject_image(image_container_object[1], getURL("media/stempel-nicht-witzig-disabled.png"));
}
log("Nicht Witzig!"); log("Nicht Witzig!");
} }