ytc-filter
ytc-filter copied to clipboard
not displayed when logging in with a premium account
Describe the bug
As title
Solution
I solved this problem by editing two functions in 'contents.js'
set selector from ytd-video-owner-renderer ytd-channel-name .yt-simple-endpoint
to ytd-video-owner-renderer ytd-channel-name a.yt-core-attributed-string__link
var getChannelId = function getChannelId() {
if (document.location.origin === 'https://studio.youtube.com') {
return 'Studio';
} else if (isYoutubeIframe()) {
return window.parent.top.document.querySelector('ytd-video-owner-renderer ytd-channel-name a.yt-core-attributed-string__link').href.split('/').pop();
} else {
// Context other than Youtube's chat
return null;
}
};
and
var getChannelName = function getChannelName() {
if (document.location.origin === 'https://studio.youtube.com') {
return 'Studio';
} else if (isYoutubeIframe()) {
return window.parent.top.document.querySelector('ytd-video-owner-renderer ytd-channel-name a.yt-core-attributed-string__link').text;
} else {
// Context other than Youtube
return null;
}
};
This extension is helpful. Thank you.