mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-15 07:57:09 +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;
|
let channelURLContainer = null;
|
||||||
|
|
||||||
if (channelNameContainer !== null) {
|
if (channelNameContainer !== null) {
|
||||||
channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
|
try {
|
||||||
} else {
|
channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
|
||||||
|
} catch (e) {
|
||||||
|
channelURLContainer = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (channelURLContainer == null) {
|
||||||
//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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user