From 9574adeaebc3171fa6623ca8fddda11ef813819a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Petrnou=C5=A1ek?= Date: Fri, 3 Oct 2014 22:32:49 +0200 Subject: [PATCH] Clicking the style name now toggles it as well --- popup.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/popup.js b/popup.js index cbd7667a..6569ada0 100644 --- a/popup.js +++ b/popup.js @@ -35,10 +35,10 @@ function createStyleElement(style) { editLink.addEventListener("click", openLink, false); if (checkbox.checked == true) { - (checkbox).addEventListener("click", function() { enable(event, false); }, false); + (checkbox, styleName).addEventListener("click", function() { enable(event, false); }, false); } else { - (checkbox).addEventListener("click", function() { enable(event, true); }, false); + (checkbox, styleName).addEventListener("click", function() { enable(event, true); }, false); } e.querySelector(".delete").addEventListener("click", function() { doDelete(event, false); }, false); return e; @@ -99,4 +99,3 @@ tE("find-styles-link", "findStylesForSite"); document.getElementById("find-styles-link").addEventListener("click", openLink, false); document.getElementById("open-manage-link").addEventListener("click", openLink, false); -