mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1720961 - Fix Firefox Translations AddonID r=mixedpuppy
Fix Firefox Translations AddonID and uninstall the old reference Differential Revision: https://phabricator.services.mozilla.com/D120121
This commit is contained in:
parent
6579e91786
commit
b0c578a3b8
@ -1977,6 +1977,16 @@ BrowserGlue.prototype = {
|
||||
_monitorTranslationsPref() {
|
||||
const PREF = "extensions.translations.disabled";
|
||||
const ID = "firefox-translations@mozilla.org";
|
||||
const oldID = "firefox-infobar-ui-bergamot-browser-extension@browser.mt";
|
||||
|
||||
// First, try to uninstall the old extension, if exists.
|
||||
(async () => {
|
||||
let addon = await AddonManager.getAddonByID(oldID);
|
||||
if (addon) {
|
||||
addon.uninstall().catch(Cu.reportError);
|
||||
}
|
||||
})();
|
||||
|
||||
const _checkTranslationsPref = async () => {
|
||||
let addon = await AddonManager.getAddonByID(ID);
|
||||
let disabled = Services.prefs.getBoolPref(PREF, false);
|
||||
|
@ -129,7 +129,7 @@
|
||||
},
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "firefox-infobar-ui-bergamot-browser-extension@browser.mt",
|
||||
"id": "firefox-translations@mozilla.org",
|
||||
"strict_min_version": "90.0a1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user