From a47fe1ff206be926a8d262c67a989d12ff9a4ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=A0?= Date: Tue, 19 Mar 2024 20:13:37 +0100 Subject: [PATCH] Fix compatibility with Firefox 124 (fixes #475) --- native/userchrome/profile/chrome/pwa/boot.jsm | 2 +- native/userchrome/profile/chrome/pwa/content/browser.jsm | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/native/userchrome/profile/chrome/pwa/boot.jsm b/native/userchrome/profile/chrome/pwa/boot.jsm index 8ae8d499..4c153e78 100644 --- a/native/userchrome/profile/chrome/pwa/boot.jsm +++ b/native/userchrome/profile/chrome/pwa/boot.jsm @@ -2,7 +2,7 @@ const EXPORTED_SYMBOLS = []; const { XPCOMUtils } = ChromeUtils.import('resource://gre/modules/XPCOMUtils.jsm'); const Services = globalThis.Services || ChromeUtils.import('resource://gre/modules/Services.jsm').Services; -XPCOMUtils.defineLazyGetter(this, 'gSystemPrincipal', () => Services.scriptSecurityManager.getSystemPrincipal()); +ChromeUtils.defineLazyGetter(this, 'gSystemPrincipal', () => Services.scriptSecurityManager.getSystemPrincipal()); XPCOMUtils.defineLazyModuleGetters(this, { AppConstants: 'resource://gre/modules/AppConstants.jsm', BrowserWindowTracker: 'resource:///modules/BrowserWindowTracker.jsm', diff --git a/native/userchrome/profile/chrome/pwa/content/browser.jsm b/native/userchrome/profile/chrome/pwa/content/browser.jsm index 7cf441ac..0f6bd851 100644 --- a/native/userchrome/profile/chrome/pwa/content/browser.jsm +++ b/native/userchrome/profile/chrome/pwa/content/browser.jsm @@ -1384,7 +1384,6 @@ class PwaBrowser { }); hookFunction(window.gProtectionsHandler, 'showActiveTooltipForTPIcon', null, async function () { - console.log('aaa') node.setAttribute('label', (await document.l10n.formatMessages(['toolbar-button-tracking-protection']))?.[0]?.attributes?.find(attr => attr.name === 'label')?.value); const message = (await document.l10n.formatValue('tracking-protection-icon-active'))?.replace(/\.$/, ''); node.setAttribute('aria-label', message); @@ -1909,7 +1908,6 @@ class PwaBrowser { xPref.clear('browser.aboutwelcome.enabled'); xPref.clear('browser.messaging-system.whatsNewPanel.enabled'); xPref.clear('browser.privateWindowSeparation.enabled'); - xPref.clear('browser.privacySegmentation.createdShortcut'); xPref.clear('browser.startup.homepage'); xPref.clear('browser.newtabpage.enabled'); xPref.clear('browser.newtabpage.activity-stream.feeds.snippets'); @@ -1991,7 +1989,7 @@ class PwaBrowser { } disableOnboarding () { - const { OnboardingMessageProvider } = ChromeUtils.import('resource://activity-stream/lib/OnboardingMessageProvider.jsm'); + const { OnboardingMessageProvider } = ChromeUtils.import('resource:///modules/asrouter/OnboardingMessageProvider.jsm'); OnboardingMessageProvider.getMessages = async () => []; OnboardingMessageProvider.getUntranslatedMessages = async () => []; OnboardingMessageProvider.getUntranslatedMessages = async () => null;