diff options
author | Ehsan Akhgari <ehsan@mozilla.com> | 2010-05-31 00:32:14 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan@mozilla.com> | 2010-05-31 00:32:14 -0400 |
commit | b94aade3d4867c5a2a9aa3948ff54b671c31d570 (patch) | |
tree | 748f0f9b9f17153e918affd80c28063088e69344 | |
parent | 3c1862264b3c3716c1b9dcbcaec650a2d04fd9ec (diff) | |
download | bugzilla-triage-b94aade3d4867c5a2a9aa3948ff54b671c31d570.tar.gz |
We can't modify a menu's label, so switch to 'Toggle' in the label
-rw-r--r-- | lib/main.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/main.js b/lib/main.js index 5fb37b6..694e3d0 100644 --- a/lib/main.js +++ b/lib/main.js @@ -69,16 +69,10 @@ function tweakBugzilla(d) { // Allow toggling of CC event displays using a context menu entry var contextMenu = require("context-menu"); - function getCCMenuItemLabel(d) { - var style = d.getElementById("bztw_cc"); - return (style.disabled ? "Hide CC History" : "Show CC History"); - } + var style = d.getElementById("bztw_cc"); var ccMenuItem = contextMenu.Item({ - label: getCCMenuItemLabel(d), - onClick: function(context, item) { - style.disabled = !style.disabled; - item.label = getCCMenuItemLabel(context.document); - } + label: "Toggle CC History", + onClick: function() style.disabled = !style.disabled }); contextMenu.add(ccMenuItem); |