Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

DuckPlayer: Open "Watch in Youtube" links in a new tab #3840

Merged
merged 3 commits into from
Feb 11, 2025
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
3 changes: 2 additions & 1 deletion DuckDuckGo/Tab/TabExtensions/DuckPlayerTabExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ extension DuckPlayerTabExtension: NavigationResponder {
return .next
}

if shouldOpenInNewTab, shouldOpenDuckPlayerDirectly,
if shouldOpenDuckPlayerDirectly,
let url = webView?.url, !url.isEmpty, !url.isYoutubeVideo {
webView?.stopAllMediaPlayback()
webView?.loadInNewWindow(navigationAction.url)
return .cancel
}
Expand Down
Loading