Fixed the checkbox
There, now everything should work. It's not ideal though, I need to figure out how to shorten it.
This commit is contained in:
parent
9574adeaeb
commit
1705ab3327
8
popup.js
8
popup.js
|
@ -34,11 +34,13 @@ function createStyleElement(style) {
|
|||
editLink.setAttribute("href", editLink.getAttribute("href") + style.id);
|
||||
editLink.addEventListener("click", openLink, false);
|
||||
|
||||
if (checkbox.checked == true) {
|
||||
(checkbox, styleName).addEventListener("click", function() { enable(event, false); }, false);
|
||||
if (checkbox.checked) {
|
||||
styleName.addEventListener("click", function() { enable(event, false); }, false);
|
||||
checkbox.addEventListener("click", function() { enable(event, false); }, false);
|
||||
}
|
||||
else {
|
||||
(checkbox, styleName).addEventListener("click", function() { enable(event, true); }, false);
|
||||
styleName.addEventListener("click", function() { enable(event, true); }, false);
|
||||
checkbox.addEventListener("click", function() { enable(event, true); }, false);
|
||||
}
|
||||
e.querySelector(".delete").addEventListener("click", function() { doDelete(event, false); }, false);
|
||||
return e;
|
||||
|
|
Loading…
Reference in New Issue
Block a user