mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-11 09:30:46 +01:00
Merge branch 'experimental-ajay' of https://github.com/ajayyy/SponsorBlock into add-invidious
This commit is contained in:
commit
58c0c6e152
1 changed files with 4 additions and 7 deletions
11
content.js
11
content.js
|
@ -514,14 +514,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) {
|
||||
|
|
Loading…
Reference in a new issue