diff options
Diffstat (limited to 'lib/main.js')
-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); |