diff --git a/content.js b/content.js index b5ec6b93..0d708241 100644 --- a/content.js +++ b/content.js @@ -499,10 +499,14 @@ function updatePreviewBar() { function getChannelID() { //get channel id let channelNameContainer = document.getElementById("channel-name"); + + if (channelNameContainer === null) { + //try later + return false; + } + let channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild; - - if (channelURLContainer === null) { //old YouTube theme let channelContainers = document.getElementsByClassName("yt-user-info");