Skip to content

Commit

Permalink
Merge pull request #27033 from brave/ksmith-yt-detection-fix
Browse files Browse the repository at this point in the history
Fix YouTube creator detection for search navigations
  • Loading branch information
zenparsing authored Dec 16, 2024
2 parents 89384d7 + 94c8c87 commit 4f0ba29
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ initializeDetector(() => {
}

let elem = document.querySelector<HTMLAnchorElement>('a[aria-label=About]')
if (elem) {
if (elem && elem.checkVisibility()) {
channel = getChannelFromURL(elem.href)
if (channel) {
return channel
}
}

elem = document.querySelector<HTMLAnchorElement>('a.ytp-ce-channel-title')
if (elem) {
if (elem && elem.checkVisibility()) {
channel = getChannelFromURL(elem.href)
if (channel) {
return channel
Expand Down

0 comments on commit 4f0ba29

Please sign in to comment.