Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening new main window on macOS uses about:blankhome #598

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading