Skip to content

Commit

Permalink
Fix compatibility with Firefox 124 (fixes #475)
Browse files Browse the repository at this point in the history
  • Loading branch information
filips123 committed Mar 19, 2024
1 parent 8329e68 commit a47fe1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion native/userchrome/profile/chrome/pwa/boot.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 1 addition & 3 deletions native/userchrome/profile/chrome/pwa/content/browser.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a47fe1f

Please sign in to comment.