From 94c8c872769ce409ea5d2b3f3e873dde25c3b641 Mon Sep 17 00:00:00 2001 From: zenparsing Date: Mon, 16 Dec 2024 12:54:42 -0500 Subject: [PATCH] Fix YouTube creator detection for search navigations --- .../brave_rewards/resources/creator_detection/youtube.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/brave_rewards/resources/creator_detection/youtube.ts b/components/brave_rewards/resources/creator_detection/youtube.ts index 26a4f0803ef4..ab9137431cec 100644 --- a/components/brave_rewards/resources/creator_detection/youtube.ts +++ b/components/brave_rewards/resources/creator_detection/youtube.ts @@ -69,7 +69,7 @@ initializeDetector(() => { } let elem = document.querySelector('a[aria-label=About]') - if (elem) { + if (elem && elem.checkVisibility()) { channel = getChannelFromURL(elem.href) if (channel) { return channel @@ -77,7 +77,7 @@ initializeDetector(() => { } elem = document.querySelector('a.ytp-ce-channel-title') - if (elem) { + if (elem && elem.checkVisibility()) { channel = getChannelFromURL(elem.href) if (channel) { return channel