From e992844fa225eb9e9dff19e44bdc3605fc8d9120 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 17 Dec 2019 18:32:01 -0500 Subject: [PATCH] Fixed channel parsing error. Fixes whitelisting issues. --- content.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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");