From 8182c47731ca48447a75eb5aaa5d075087eb2edc Mon Sep 17 00:00:00 2001 From: shinigami-eyes <43276258+shinigami-eyes@users.noreply.github.com> Date: Sat, 14 Sep 2019 19:32:49 +0200 Subject: [PATCH] Fix missing YouTube channel name right-clickability --- extension/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content.ts b/extension/content.ts index 394b448..b5f9548 100644 --- a/extension/content.ts +++ b/extension/content.ts @@ -146,8 +146,8 @@ function updateTwitterClasses() { function updateYouTubeChannelHeader() { var url = window.location.href; - var title = document.getElementById('channel-title'); - if (title && title.tagName == 'H3') title = null; // search results, already a link + var title = document.querySelector('#channel-header ytd-channel-name yt-formatted-string'); + if (title && !title.parentElement.offsetParent) title = null; var currentTitle = title ? title.textContent : null; if (url == lastAppliedYouTubeUrl && currentTitle == lastAppliedYouTubeTitle) return;