|
1 | 1 | // ==UserScript== |
2 | | -// @version 1.9.4 |
| 2 | +// @version 1.9.5 |
3 | 3 | // @name YouTube + |
4 | 4 | // @namespace https://github.com/ParticleCore |
5 | 5 | // @description YouTube with more freedom |
|
1215 | 1215 | button.content.firstChild.dataset.link = temp[j].querySelector("a[href*='/watch?v']").href; |
1216 | 1216 | thumb.appendChild(setLocale(button.content).firstChild); |
1217 | 1217 | } |
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") { |
1219 | 1219 | button = document.createElement("template"); |
1220 | 1220 | button.innerHTML = // |
1221 | 1221 | `<div data-p='ttl|BLCK_ADD&ttp|BLCK_ADD' class='yt-uix-tooltip blacklist'> |
|
1285 | 1285 | } |
1286 | 1286 | } |
1287 | 1287 | function getVideos() { |
1288 | | - var i, list, temp, video_list, channel_id; |
| 1288 | + var i, list, temp, video_list, watch_id, channel_id; |
1289 | 1289 | modThumbs.thumbs = {}; |
1290 | 1290 | video_list = Array.from(document.querySelectorAll(` |
1291 | 1291 | .yt-shelf-grid-item, |
|
1297 | 1297 | .yt-lockup-byline > a, |
1298 | 1298 | .yt-lockup-content .g-hovercard, |
1299 | 1299 | .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 |
1301 | 1302 | `); |
1302 | 1303 | i = list.length; |
1303 | 1304 | while (i--) { |
|
1318 | 1319 | } |
1319 | 1320 | temp = temp.parentNode; |
1320 | 1321 | } |
| 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 | + } |
1321 | 1338 | } |
1322 | 1339 | } |
1323 | 1340 | } |
|
0 commit comments