Fixed channel whitelisting on old YouTube.

This commit is contained in:
Ajay Ramachandran 2019-12-19 00:46:37 -05:00
parent 81bf54c42d
commit 36078acaee

View file

@ -500,14 +500,11 @@ function getChannelID() {
//get channel id //get channel id
let channelNameContainer = document.getElementById("channel-name"); let channelNameContainer = document.getElementById("channel-name");
if (channelNameContainer === null) { let channelURLContainer = null;
//try later
return false;
}
let channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild; if (channelNameContainer !== null) {
channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
if (channelURLContainer === null) { } else {
//old YouTube theme //old YouTube theme
let channelContainers = document.getElementsByClassName("yt-user-info"); let channelContainers = document.getElementsByClassName("yt-user-info");
if (channelContainers.length != 0) { if (channelContainers.length != 0) {