bug 362400: "Report Web Forgery" in the help menu stops working after opening

customize palette
patch: v2: move onpopupshowing into existing function buildHelpMenu
r=gavin
This commit is contained in:
tony%ponderer.org 2007-01-16 03:07:54 +00:00
parent 64d888aa96
commit 6bb67e0e78
2 changed files with 5 additions and 13 deletions

View File

@ -464,6 +464,11 @@ function checkForUpdates()
function buildHelpMenu()
{
// Enable/disable the "Report Web Forgery" menu item. safebrowsing object
// may not exist in OSX
if (typeof safebrowsing != "undefined")
safebrowsing.setReportPhishingMenu();
var updates =
Components.classes["@mozilla.org/updates/update-service;1"].
getService(Components.interfaces.nsIApplicationUpdateService);

View File

@ -61,13 +61,6 @@ var safebrowsing = {
startup: function() {
setTimeout(safebrowsing.deferredStartup, 2000);
var helpMenu = document.getElementById("menu_HelpPopup");
if (helpMenu) {
helpMenu.addEventListener("popupshowing",
safebrowsing.setReportPhishingMenu,
false);
}
// clean up
window.removeEventListener("load", safebrowsing.startup, false);
},
@ -139,12 +132,6 @@ var safebrowsing = {
if (safebrowsing.phishWarden) {
safebrowsing.phishWarden.shutdown();
}
var helpMenu = document.getElementById("menu_HelpPopup");
if (helpMenu) {
helpMenu.removeEventListener("popupshowing",
safebrowsing.setReportPhishingMenu,
false);
}
window.removeEventListener("unload", safebrowsing.shutdown, false);
},