Skip to content
This repository was archived by the owner on Mar 23, 2018. It is now read-only.

Commit f6b88cd

Browse files
committed
1.9.5
Closes #610
1 parent f91e6c3 commit f6b88cd

File tree

7 files changed

+45
-11
lines changed

7 files changed

+45
-11
lines changed

bin/update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"addons": {
33
44
"updates": [{
5-
"version": "1.9.4",
5+
"version": "1.9.5",
66
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
77
"applications": {
88
"gecko": {

dist/Particle.nex

161 Bytes
Binary file not shown.

dist/YouTubePlus.xpi

134 Bytes
Binary file not shown.

src/Opera/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Particle",
4-
"version": "1.9.4",
4+
"version": "1.9.5",
55
"description": "YouTube with more freedom",
66
"default_locale": "en",
77
"icons": {

src/Userscript/YouTubePlus.user.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==UserScript==
2-
// @version 1.9.4
2+
// @version 1.9.5
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
@@ -1215,7 +1215,7 @@
12151215
button.content.firstChild.dataset.link = temp[j].querySelector("a[href*='/watch?v']").href;
12161216
thumb.appendChild(setLocale(button.content).firstChild);
12171217
}
1218-
if (user_settings.BLK_ON && !thumb.querySelector(".blacklist") && window.yt.config_.PAGE_NAME !== "channel" && window.location.pathname !== "/feed/subscriptions") {
1218+
if (user_settings.BLK_ON && list[i] !== "no_channel_id" && !thumb.querySelector(".blacklist") && window.yt.config_.PAGE_NAME !== "channel" && window.location.pathname !== "/feed/subscriptions") {
12191219
button = document.createElement("template");
12201220
button.innerHTML = //
12211221
`<div data-p='ttl|BLCK_ADD&ttp|BLCK_ADD' class='yt-uix-tooltip blacklist'>
@@ -1285,7 +1285,7 @@
12851285
}
12861286
}
12871287
function getVideos() {
1288-
var i, list, temp, video_list, channel_id;
1288+
var i, list, temp, video_list, watch_id, channel_id;
12891289
modThumbs.thumbs = {};
12901290
video_list = Array.from(document.querySelectorAll(`
12911291
.yt-shelf-grid-item,
@@ -1297,7 +1297,8 @@
12971297
.yt-lockup-byline > a,
12981298
.yt-lockup-content .g-hovercard,
12991299
.video-list-item .g-hovercard,
1300-
.channels-content-item .yt-lockup-title > a
1300+
.channels-content-item .yt-lockup-title > a,
1301+
.watch-sidebar-section .content-link
13011302
`);
13021303
i = list.length;
13031304
while (i--) {
@@ -1318,6 +1319,22 @@
13181319
}
13191320
temp = temp.parentNode;
13201321
}
1322+
} else {
1323+
watch_id = temp.href.match(/\/watch?/);
1324+
if (watch_id) {
1325+
watch_id = watch_id[1];
1326+
while (temp) {
1327+
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
1328+
if (!modThumbs.thumbs["no_channel_id"]) {
1329+
modThumbs.thumbs["no_channel_id"] = [temp];
1330+
} else if (modThumbs.thumbs["no_channel_id"].indexOf(temp) < 0) {
1331+
modThumbs.thumbs["no_channel_id"].push(temp);
1332+
}
1333+
break;
1334+
}
1335+
temp = temp.parentNode;
1336+
}
1337+
}
13211338
}
13221339
}
13231340
}

src/Webextension/JS/YouTubePlus.user.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==UserScript==
2-
// @version 1.9.4
2+
// @version 1.9.5
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
@@ -1215,7 +1215,7 @@
12151215
button.content.firstChild.dataset.link = temp[j].querySelector("a[href*='/watch?v']").href;
12161216
thumb.appendChild(setLocale(button.content).firstChild);
12171217
}
1218-
if (user_settings.BLK_ON && !thumb.querySelector(".blacklist") && window.yt.config_.PAGE_NAME !== "channel" && window.location.pathname !== "/feed/subscriptions") {
1218+
if (user_settings.BLK_ON && list[i] !== "no_channel_id" && !thumb.querySelector(".blacklist") && window.yt.config_.PAGE_NAME !== "channel" && window.location.pathname !== "/feed/subscriptions") {
12191219
button = document.createElement("template");
12201220
button.innerHTML = //
12211221
`<div data-p='ttl|BLCK_ADD&ttp|BLCK_ADD' class='yt-uix-tooltip blacklist'>
@@ -1285,7 +1285,7 @@
12851285
}
12861286
}
12871287
function getVideos() {
1288-
var i, list, temp, video_list, channel_id;
1288+
var i, list, temp, video_list, watch_id, channel_id;
12891289
modThumbs.thumbs = {};
12901290
video_list = Array.from(document.querySelectorAll(`
12911291
.yt-shelf-grid-item,
@@ -1297,7 +1297,8 @@
12971297
.yt-lockup-byline > a,
12981298
.yt-lockup-content .g-hovercard,
12991299
.video-list-item .g-hovercard,
1300-
.channels-content-item .yt-lockup-title > a
1300+
.channels-content-item .yt-lockup-title > a,
1301+
.watch-sidebar-section .content-link
13011302
`);
13021303
i = list.length;
13031304
while (i--) {
@@ -1318,6 +1319,22 @@
13181319
}
13191320
temp = temp.parentNode;
13201321
}
1322+
} else {
1323+
watch_id = temp.href.match(/\/watch?/);
1324+
if (watch_id) {
1325+
watch_id = watch_id[1];
1326+
while (temp) {
1327+
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
1328+
if (!modThumbs.thumbs["no_channel_id"]) {
1329+
modThumbs.thumbs["no_channel_id"] = [temp];
1330+
} else if (modThumbs.thumbs["no_channel_id"].indexOf(temp) < 0) {
1331+
modThumbs.thumbs["no_channel_id"].push(temp);
1332+
}
1333+
break;
1334+
}
1335+
temp = temp.parentNode;
1336+
}
1337+
}
13211338
}
13221339
}
13231340
}

src/Webextension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "YouTube Plus",
4-
"version": "1.9.4",
4+
"version": "1.9.5",
55
"description": "YouTube with more freedom",
66
"default_locale": "en",
77
"icons": {

0 commit comments

Comments
 (0)