summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-05-11 12:08:21 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-05-11 12:08:21 -0400
commitf857efc350ee5ffd711037ec880cc6b2d2d6ff66 (patch)
tree8fa17516ea86af402778a7c87cbb91aae2a39340 /application/palemoon/base
parent8b7d91e514ee8f5e3858bdbd8495b2d50600ca66 (diff)
downloadUXP-f857efc350ee5ffd711037ec880cc6b2d2d6ff66.tar
UXP-f857efc350ee5ffd711037ec880cc6b2d2d6ff66.tar.gz
UXP-f857efc350ee5ffd711037ec880cc6b2d2d6ff66.tar.lz
UXP-f857efc350ee5ffd711037ec880cc6b2d2d6ff66.tar.xz
UXP-f857efc350ee5ffd711037ec880cc6b2d2d6ff66.zip
[PALEMOON] buildHelpMenu() is executed by the shared help menu but not all windows have the AppMenu
Diffstat (limited to 'application/palemoon/base')
-rw-r--r--application/palemoon/base/content/utilityOverlay.js32
1 files changed, 25 insertions, 7 deletions
diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js
index e0f841a06..d7c8088c7 100644
--- a/application/palemoon/base/content/utilityOverlay.js
+++ b/application/palemoon/base/content/utilityOverlay.js
@@ -584,10 +584,16 @@ function buildHelpMenu()
var checkForUpdates = document.getElementById("checkForUpdates");
var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates");
var canCheckForUpdates = updates.canCheckForUpdates;
+
checkForUpdates.setAttribute("disabled", !canCheckForUpdates);
- appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
- if (!canCheckForUpdates)
+
+ if (appMenuCheckForUpdates) {
+ appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
+ }
+
+ if (!canCheckForUpdates) {
return;
+ }
var strings = document.getElementById("bundle_browser");
var activeUpdate = um.activeUpdate;
@@ -623,19 +629,31 @@ function buildHelpMenu()
}
checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
- appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+
+ if (appMenuCheckForUpdates) {
+ appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+ }
+
// updatesItem_default.accesskey, updatesItem_downloading.accesskey,
// updatesItem_resume.accesskey or updatesItem_pending.accesskey
checkForUpdates.accessKey = strings.getString("updatesItem_" + key +
".accesskey");
- appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
- ".accesskey");
+
+ if (appMenuCheckForUpdates) {
+ appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
+ ".accesskey");
+ }
+
if (um.activeUpdate && updates.isDownloading) {
checkForUpdates.setAttribute("loading", "true");
- appMenuCheckForUpdates.setAttribute("loading", "true");
+ if (appMenuCheckForUpdates) {
+ appMenuCheckForUpdates.setAttribute("loading", "true");
+ }
} else {
checkForUpdates.removeAttribute("loading");
- appMenuCheckForUpdates.removeAttribute("loading");
+ if (appMenuCheckForUpdates) {
+ appMenuCheckForUpdates.removeAttribute("loading");
+ }
}
#else
#ifndef XP_MACOSX