mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-14 15:37:12 +03:00
Prevented error on embed.
Resolves https://github.com/ajayyy/SponsorBlock/issues/202
This commit is contained in:
10
content.js
10
content.js
@@ -503,8 +503,14 @@ function getChannelID() {
|
||||
let channelURLContainer = null;
|
||||
|
||||
if (channelNameContainer !== null) {
|
||||
channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
|
||||
} else {
|
||||
try {
|
||||
channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
|
||||
} catch (e) {
|
||||
channelURLContainer = null
|
||||
}
|
||||
}
|
||||
|
||||
if (channelURLContainer == null) {
|
||||
//old YouTube theme
|
||||
let channelContainers = document.getElementsByClassName("yt-user-info");
|
||||
if (channelContainers.length != 0) {
|
||||
|
||||
Reference in New Issue
Block a user