mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-11 09:30:46 +01:00
Merge pull request #201 from ajayyy/experimental-ajay
Fixed channel whitelisting on old YouTube
This commit is contained in:
commit
2c19da2117
2 changed files with 5 additions and 8 deletions
11
content.js
11
content.js
|
@ -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) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "__MSG_Name__",
|
"short_name": "__MSG_Name__",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
|
|
Loading…
Reference in a new issue