aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2010-05-31 00:32:14 -0400
committerEhsan Akhgari <ehsan@mozilla.com>2010-05-31 00:32:14 -0400
commitb94aade3d4867c5a2a9aa3948ff54b671c31d570 (patch)
tree748f0f9b9f17153e918affd80c28063088e69344
parent3c1862264b3c3716c1b9dcbcaec650a2d04fd9ec (diff)
downloadbugzilla-triage-b94aade3d4867c5a2a9aa3948ff54b671c31d570.tar.gz
We can't modify a menu's label, so switch to 'Toggle' in the label
-rw-r--r--lib/main.js12
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);