From e7fc37a82858362dbf80d7b1f27dae4b257eded6 Mon Sep 17 00:00:00 2001 From: Jovan Gerodetti Date: Fri, 13 Dec 2024 00:32:20 +0100 Subject: [PATCH] Opening new main window on macOS uses about:blankhome --- native/userchrome/profile/chrome/pwa/boot.jsm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/userchrome/profile/chrome/pwa/boot.jsm b/native/userchrome/profile/chrome/pwa/boot.jsm index b6ea1d1f..034f45a9 100644 --- a/native/userchrome/profile/chrome/pwa/boot.jsm +++ b/native/userchrome/profile/chrome/pwa/boot.jsm @@ -184,14 +184,14 @@ nsDefaultCommandLineHandler.prototype.handle = function (cmdLine) { // This does not matter currently because of #81, but once it is fixed, this also needs to be reworked if (AppConstants.platform === 'macosx') { const { nsBrowserContentHandler } = Cu.import('resource:///modules/BrowserContentHandler.jsm'); - nsBrowserContentHandler.prototype._getArgs = nsBrowserContentHandler.prototype.getArgs; - nsBrowserContentHandler.prototype.getArgs = function () { + nsBrowserContentHandler.prototype._getNewWindowArgs = nsBrowserContentHandler.prototype.getNewWindowArgs; + nsBrowserContentHandler.prototype.getNewWindowArgs = function () { if (globalThis.gFFPWASiteConfig) { const userStartUrl = globalThis.gFFPWASiteConfig.config.start_url; const manifestStartUrl = globalThis.gFFPWASiteConfig.manifest.start_url; return userStartUrl ? userStartUrl : manifestStartUrl; } else { - return this._getArgs(...arguments); + return this._getNewWindowArgs(...arguments); } } }