Skip to content

Commit

Permalink
Merge pull request #598 from TitanNano/jovan/fix_macos_new_window
Browse files Browse the repository at this point in the history
Opening new main window on macOS uses about:blankhome
  • Loading branch information
filips123 authored Dec 21, 2024
2 parents 1aa7530 + e7fc37a commit 4a0601c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/userchrome/profile/chrome/pwa/boot.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 4a0601c

Please sign in to comment.