-
Notifications
You must be signed in to change notification settings - Fork 818
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
Add a new setting to open links in a new window #5592
base: development
Are you sure you want to change the base?
Add a new setting to open links in a new window #5592
Conversation
if (mainWindow && mainWindow.webContents) { | ||
mainWindow.webContents.send(IpcChannels.OPEN_URL, baseUrl(url)) | ||
if (isOpenLinkInNewWindow()) { | ||
createWindow({ replaceMainWindow: false, windowStartupUrl: startUrl, showWindowNow: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably an IPC to open a new window.
@@ -820,7 +824,11 @@ function runApp() { | |||
|
|||
ipcMain.once(IpcChannels.APP_READY, () => { | |||
if (startupUrl) { | |||
mainWindow.webContents.send(IpcChannels.OPEN_URL, startupUrl) | |||
if (isOpenLinkInNewWindow()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably check if there's already content on the window too.
This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Title
Pull Request Type
Related issue
Closes #1501
Description
It adds a global setting that makes
freetube://
links be opened in a new windowScreenshots
Testing
I have not been able to pull the dependencies from yarn, as it errors in one of them. Thus, I have not been able to test the generation of the settings or whether the implementation is correct.
Desktop
Additional context
The PR is as-is for someone else to finalize and land.