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

Commit c8ef506

Browse files
committed
1.8.7
- Fixed #501
1 parent 208af58 commit c8ef506

File tree

8 files changed

+81
-87
lines changed

8 files changed

+81
-87
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
"unlisted-particle@particlecore.github.io": {
44
"updates": [{
5-
"version": "1.8.6",
5+
"version": "1.8.7",
66
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
77
"applications": {
88
"gecko": {

dist/Particle.nex

-58 Bytes
Binary file not shown.

dist/YouTubePlus.xpi

-60 Bytes
Binary file not shown.

src/Opera/JS/YouTubePlus.user.js

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==UserScript==
2-
// @version 1.8.6
2+
// @version 1.8.7
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
@@ -385,7 +385,7 @@
385385
if (target.classList.contains("P-impexp") || target.classList.contains("P-implang")) {
386386
expCont = document.getElementById("exp-cont");
387387
if (expCont) {
388-
expCont.outerHTML = "";
388+
expCont.remove();
389389
return;
390390
}
391391
expCont = document.createElement("template");
@@ -426,7 +426,7 @@
426426
function delBlackList(event) {
427427
var newKey = user_settings.blacklist;
428428
delete newKey[event.target.nextSibling.href.split("/channel/")[1]];
429-
event.target.parentNode.outerHTML = "";
429+
event.target.parentNode.remove();
430430
set("blacklist", newKey);
431431
}
432432
function delNotification() {
@@ -451,7 +451,7 @@
451451
if (!salt) {
452452
notification = document.getElementById("appbar-main-guide-notification-container");
453453
if (notification.childNodes.length < 1) {
454-
notification.outerHTML = "";
454+
notification.remove();
455455
notification = document.createElement("template");
456456
notification.innerHTML = //
457457
`<div id='appbar-main-guide-notification-container'>
@@ -485,12 +485,12 @@
485485
setBlackList(event.target);
486486
} else if (event.target.id === "P-container" || event.target.id === "P-settings") {
487487
event = (event.target.id === "P-settings") ? event.target : event.target.parentNode;
488-
event.outerHTML = "";
488+
event.remove();
489489
document[(window.chrome && "body") || "documentElement"].scrollTop = 0;
490490
window.dispatchEvent(new Event("resize"));
491491
} else if (event.target.id !== "DNT" && event.target.tagName !== "A" && event.target.parentNode.id === "P-sidebar-list") {
492492
saveSettings("no-notification");
493-
document.getElementById("P-content").outerHTML = "";
493+
document.getElementById("P-content").remove();
494494
document.getElementById("P-container").appendChild(getMenu(event.target.id));
495495
event.target.parentNode.querySelector(".selected").removeAttribute("class");
496496
event.target.className = "selected";
@@ -501,7 +501,7 @@
501501
if (event.target.id === "P" && event.target.tagName !== "INPUT") {
502502
pWrapper = document.getElementById("P-settings");
503503
if (pWrapper) {
504-
pWrapper.outerHTML = "";
504+
pWrapper.remove();
505505
} else {
506506
if (document.documentElement.classList.contains("floater")) {
507507
document.documentElement.classList.remove("floater");
@@ -950,15 +950,18 @@
950950
}
951951
}
952952
function getThumb() {
953-
if (getThumb.thumbnail_url) {
954-
window.open(getThumb.thumbnail_url);
953+
var thumbnail_url;
954+
thumbnail_url = document.querySelector("[href*='maxresdefault']");
955+
thumbnail_url = thumbnail_url && thumbnail_url.getAttribute("href");
956+
if (thumbnail_url) {
957+
window.open(thumbnail_url);
955958
} else if (window.ytplayer && window.ytplayer.config && window.ytplayer.config.args && window.ytplayer.config.args.thumbnail_url) {
956959
window.open(window.ytplayer.config.args.thumbnail_url);
957960
}
958961
}
959962
function hideScreenshot(event) {
960963
if (event.target.id === "close-screenshot") {
961-
event.target.parentNode.outerHTML = "";
964+
event.target.parentNode.remove();
962965
document.removeEventListener("click", hideScreenshot);
963966
}
964967
}
@@ -1129,7 +1132,7 @@
11291132
}
11301133
}
11311134
function advancedOptions() {
1132-
var header, cnslBtn, cnslCont, thumbnail_url;
1135+
var header, cnslBtn, cnslCont;
11331136
header = document.getElementById("watch-header");
11341137
cnslBtn = document.getElementById("console-button");
11351138
advancedOptions.controls = document.getElementById("player-console");
@@ -1154,7 +1157,7 @@
11541157
cnslCont.appendChild(cnslBtn);
11551158
header.appendChild(cnslCont);
11561159
if (advancedOptions.controls) {
1157-
advancedOptions.controls.outerHTML = "";
1160+
advancedOptions.controls.remove();
11581161
}
11591162
advancedOptions.controls = document.createElement("template");
11601163
advancedOptions.controls.innerHTML = //
@@ -1172,11 +1175,6 @@
11721175
if (user_settings.VID_PLR_ATPL) {
11731176
advancedOptions.controls.content.querySelector("#autoplay-button").classList.add("active");
11741177
}
1175-
thumbnail_url = document.querySelector("link[itemprop='thumbnailUrl'], span[itemprop='thumbnail'] link[itemprop='url']");
1176-
thumbnail_url = thumbnail_url && thumbnail_url.getAttribute("href");
1177-
if (thumbnail_url) {
1178-
getThumb.thumbnail_url = thumbnail_url;
1179-
}
11801178
advancedOptions.controls = setLocale(advancedOptions.controls.content).firstChild;
11811179
cnslCont.appendChild(advancedOptions.controls);
11821180
hookButtons();
@@ -1264,24 +1262,24 @@
12641262
j = temp.length;
12651263
while (j--) {
12661264
if (has_upnext && has_upnext.contains(temp[j])) {
1267-
has_upnext.parentNode.outerHTML = "";
1265+
has_upnext.parentNode.remove();
12681266
has_upnext = document.querySelector(".watch-sidebar-separation-line");
12691267
if (has_upnext) {
1270-
has_upnext.outerHTML = "";
1268+
has_upnext.remove();
12711269
}
12721270
has_upnext = false;
12731271
parent = false;
12741272
} else {
12751273
parent = temp[j].parentNode;
1276-
temp[j].outerHTML = "";
1274+
temp[j].remove();
12771275
}
12781276
temp.splice(j, 1);
12791277
while (parent) {
12801278
if (parent.childElementCount) {
12811279
break;
12821280
}
12831281
parent = parent.parentNode;
1284-
parent.firstChild.outerHTML = "";
1282+
parent.firstChild.remove();
12851283
}
12861284
}
12871285
if (!temp.length) {
@@ -1295,13 +1293,13 @@
12951293
while (i--) {
12961294
if (temp[i].querySelectorAll("ul").length < 2) {
12971295
parent = temp[i].parentNode;
1298-
temp[i].outerHTML = "";
1296+
temp[i].remove();
12991297
while (parent) {
13001298
if (parent.childElementCount) {
13011299
break;
13021300
}
13031301
parent = parent.parentNode;
1304-
parent.firstChild.outerHTML = "";
1302+
parent.firstChild.remove();
13051303
}
13061304
}
13071305
}
@@ -1802,7 +1800,7 @@
18021800
while (child) {
18031801
parent = child.parentNode;
18041802
if (parent.childElementCount > 1) {
1805-
child.outerHTML = "";
1803+
child.remove();
18061804
break;
18071805
}
18081806
child = parent;
@@ -1825,10 +1823,10 @@
18251823
)
18261824
)
18271825
) {
1828-
sidebar.outerHTML = "";
1826+
sidebar.remove();
18291827
}
18301828
if (!window.location.search.match(/&?(lc|google_comment_id)=/) && window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
1831-
comments.outerHTML = "";
1829+
comments.remove();
18321830
}
18331831
if (user_settings.VID_HIDE_COMS === "1") {
18341832
document.documentElement.classList.add("part_hide_comments");
@@ -1990,7 +1988,7 @@
19901988
if (user_settings.GEN_REM_APUN && window.location.pathname === "/watch" && autoplaybar) {
19911989
checkbox = document.querySelector(".checkbox-on-off");
19921990
if (checkbox) {
1993-
checkbox.outerHTML = "";
1991+
checkbox.remove();
19941992
}
19951993
}
19961994
if (user_settings.VID_LAYT_AUTO_PNL && window.location.pathname === "/watch" && description) {
@@ -2376,7 +2374,7 @@
23762374
holder = document.createElement("link");
23772375
holder.rel = "stylesheet";
23782376
holder.type = "text/css";
2379-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.6";
2377+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.7";
23802378
document.documentElement.appendChild(holder);
23812379
}
23822380
holder = document.createElement("script");

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.8.6",
4+
"version": "1.8.7",
55
"description": "YouTube with more freedom",
66
"default_locale": "en",
77
"icons": {

0 commit comments

Comments
 (0)