aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2010-05-31 01:10:18 -0400
committerEhsan Akhgari <ehsan@mozilla.com>2010-05-31 01:10:18 -0400
commit7e1331bc3b30b58679d18cd38b05b6df5b6636e8 (patch)
tree13c360ac7137a6c8cca42c8b2932de89f8dee545 /lib/main.js
parent5939fa3a907f9dd91193dea3d2e61f1ba64a84ce (diff)
downloadbugzilla-triage-7e1331bc3b30b58679d18cd38b05b6df5b6636e8.tar.gz
Remove the context menu on page unload
Diffstat (limited to 'lib/main.js')
-rw-r--r--lib/main.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/main.js b/lib/main.js
index 09cd0ae..1de348f 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -75,6 +75,9 @@ function tweakBugzilla(d) {
onClick: function() style.disabled = !style.disabled
});
contextMenu.add(ccMenuItem);
+ d.defaultView.addEventListener("unload", function() {
+ contextMenu.remove(ccMenuItem);
+ }, false);
var userNameCache = {};
function getUserName(email) {
@@ -155,6 +158,9 @@ function tweakBugzilla(d) {
onClick: function() require("clipboard").set(message)
});
contextMenu.add(copyCheckinCommentItem);
+ d.defaultView.addEventListener("unload", function() {
+ contextMenu.remove(copyCheckinCommentItem);
+ }, false);
}
}