From d6a2deb0c532504bf36d30755460b2486e9473a1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 28 Jan 2019 15:33:57 +0100 Subject: Add nullcheck for addons (pre-installed webextensions return null) Tag #937. --- application/basilisk/components/nsBrowserGlue.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/basilisk/components') diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index 3258159b6..c2e215376 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -1110,10 +1110,10 @@ BrowserGlue.prototype = { let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED); AddonManager.getAddonsByIDs(disabledAddons, (addons) => { for (let addon of addons) { - if (addon.type == "experiment") + if (addon && addon.type == "experiment") continue; - if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { + if (addon && addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { this._notifyUnsignedAddonsDisabled(); break; } -- cgit v1.2.3 From 2cbbc5de4596ef3436685fa3316eeed9af700249 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 28 Jan 2019 15:56:37 +0100 Subject: [BASILISK] Align browser glue with TychoAM for enableable add-ons. --- application/basilisk/components/nsBrowserGlue.js | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'application/basilisk/components') diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index c2e215376..d77e97f87 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -1080,24 +1080,19 @@ BrowserGlue.prototype = { // For any add-ons that were installed disabled and can be enabled offer // them to the user. - let win = RecentWindow.getMostRecentBrowserWindow(); - AddonManager.getAllAddons(addons => { - for (let addon of addons) { - // If this add-on has already seen (or seen is undefined for non-XPI - // add-ons) then skip it. - if (addon.seen !== false) { - continue; - } - - // If this add-on cannot be enabled (either already enabled or - // appDisabled) then skip it. - if (!(addon.permissions & AddonManager.PERM_CAN_ENABLE)) { - continue; - } - - win.openUILinkIn("about:newaddon?id=" + addon.id, "tab"); - } - }); + let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED); + if (changedIDs.length > 0) { + let win = this.getMostRecentBrowserWindow(); + AddonManager.getAddonsByIDs(changedIDs, function(aAddons) { + aAddons.forEach(function(aAddon) { + // If the add-on isn't user disabled or can't be enabled then skip it. + if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE)) + return; + + win.openUILinkIn("about:newaddon?id=" + aAddon.id, "tab"); + }) + }); + } let signingRequired; if (AppConstants.MOZ_REQUIRE_SIGNING) { @@ -1110,10 +1105,15 @@ BrowserGlue.prototype = { let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED); AddonManager.getAddonsByIDs(disabledAddons, (addons) => { for (let addon of addons) { - if (addon && addon.type == "experiment") + // WEs return null, skip. + if (!addon) { + continue; + } + + if (addon.type == "experiment") continue; - if (addon && addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { + if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) { this._notifyUnsignedAddonsDisabled(); break; } -- cgit v1.2.3 From 6567bb631a78033b6b4cc32bc93e07d837652276 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 7 Feb 2019 12:58:13 +0100 Subject: Never let "localhost" get sent to a proxy. Also make "No proxy for" editable always when usable. --- application/basilisk/components/preferences/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/basilisk/components') diff --git a/application/basilisk/components/preferences/connection.js b/application/basilisk/components/preferences/connection.js index f6b395a2d..349139bed 100644 --- a/application/basilisk/components/preferences/connection.js +++ b/application/basilisk/components/preferences/connection.js @@ -76,7 +76,7 @@ var gConnectionsDialog = { var autologinProxyPref = document.getElementById("signon.autologin.proxy"); autologinProxyPref.disabled = proxyTypePref.value == 0; var noProxiesPref = document.getElementById("network.proxy.no_proxies_on"); - noProxiesPref.disabled = proxyTypePref.value != 1; + noProxiesPref.disabled = proxyTypePref.value == 0; var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url"); autoconfigURLPref.disabled = proxyTypePref.value != 2; -- cgit v1.2.3