diff options
-rw-r--r-- | content.js | 11 | ||||
-rw-r--r-- | manifest.json | 2 |
2 files changed, 5 insertions, 8 deletions
@@ -500,14 +500,11 @@ function getChannelID() { //get channel id let channelNameContainer = document.getElementById("channel-name"); - if (channelNameContainer === null) { - //try later - return false; - } + let channelURLContainer = null; - let channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild; - - if (channelURLContainer === null) { + if (channelNameContainer !== null) { + channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild; + } else { //old YouTube theme let channelContainers = document.getElementsByClassName("yt-user-info"); if (channelContainers.length != 0) { diff --git a/manifest.json b/manifest.json index 99f13b77..8b1e6e64 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.0", + "version": "1.2.1", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [ |