Fix missing YouTube channel name right-clickability

This commit is contained in:
shinigami-eyes 2019-09-14 19:32:49 +02:00
parent 97f302b271
commit 8182c47731

View File

@ -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 = <HTMLElement>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;