Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not displayed when logging in with a premium account #93

Open
Rainbowrain-TW opened this issue Dec 10, 2022 · 0 comments
Open

not displayed when logging in with a premium account #93

Rainbowrain-TW opened this issue Dec 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Rainbowrain-TW
Copy link

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.

@Rainbowrain-TW Rainbowrain-TW added the bug Something isn't working label Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant