Skip to content

not displayed when logging in with a premium account #93

@Rainbowrain-TW

Description

@Rainbowrain-TW

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions