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;