Skip to content

Switch from OPEN_EXTERNAL_LINK IPC call to window.open() #7380

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

absidue
Copy link
Member

@absidue absidue commented May 8, 2025

Pull Request Type

  • Bugfix
  • Security improvement

Description

This pull request removes the OPEN_EXTERNAL_LINK IPC call in favour of using window.open() in combination with webContents.setWindowOpenHandler. I also replaced the parameterless IPC call to CREATE_NEW_WINDOW with window.open() to the app URL, I unfortunately wasn't able to get rid of the CREATE_NEW_WINDOW IPC call, as the other usage in openInternalPath passes through the searchQueryText, not just a URL (I am open to ideas on how we could deal with that).

Testing

  1. Test that the new window button in the top navigation bar still opens a new window to your configured landing page.
  2. Find a video with external links in the description (e.g. donation link or merch store) and check that clicking on them still opens them in your web browser.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: bd0b04a

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 8, 2025 21:51
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 8, 2025
@FreeTubeBot FreeTubeBot merged commit 3e0f420 into FreeTubeApp:development May 13, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 13, 2025
@absidue absidue deleted the external-url-handling branch May 14, 2025 05:11
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request May 15, 2025
* development: (49 commits)
  Bump electron from 35.2.1 to 36.2.0 (FreeTubeApp#7403)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Slovak)
  Switch from OPEN_EXTERNAL_LINK IPC call to window.open() (FreeTubeApp#7380)
  Translated using Weblate (Korean)
  Translated using Weblate (Slovak)
  Translated using Weblate (Assamese)
  Translated using Weblate (Romanian)
  Translated using Weblate (Croatian)
  Translated using Weblate (Slovak)
  Translated using Weblate (Assamese)
  Fix typo in WRITE_TO_DEFAULT_FOLDER IPC call (FreeTubeApp#7378)
  Pause player when opening recommended video in external player (FreeTubeApp#7387)
  Migrate the PlaylistInfo component to the composition API (FreeTubeApp#7383)
  Migrate the PrivacySettings component to the composition API (FreeTubeApp#7397)
  Migrate the FtProfileSelector component to the composition API (FreeTubeApp#7388)
  ...
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request May 15, 2025
* custom-builds/current: (49 commits)
  Bump electron from 35.2.1 to 36.2.0 (FreeTubeApp#7403)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Slovak)
  Switch from OPEN_EXTERNAL_LINK IPC call to window.open() (FreeTubeApp#7380)
  Translated using Weblate (Korean)
  Translated using Weblate (Slovak)
  Translated using Weblate (Assamese)
  Translated using Weblate (Romanian)
  Translated using Weblate (Croatian)
  Translated using Weblate (Slovak)
  Translated using Weblate (Assamese)
  Fix typo in WRITE_TO_DEFAULT_FOLDER IPC call (FreeTubeApp#7378)
  Pause player when opening recommended video in external player (FreeTubeApp#7387)
  Migrate the PlaylistInfo component to the composition API (FreeTubeApp#7383)
  Migrate the PrivacySettings component to the composition API (FreeTubeApp#7397)
  Migrate the FtProfileSelector component to the composition API (FreeTubeApp#7388)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants