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

Commit a89b3e2

Browse files
committed
1.7.8
- Fixed #450 - Updated Material Layout information
1 parent cfcf24c commit a89b3e2

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

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.7.7",
5+
"version": "1.7.8",
66
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
77
"applications": {
88
"gecko": {

dist/YouTubePlus.xpi

61 Bytes
Binary file not shown.

src/Userscript/YouTubePlus.user.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==UserScript==
2-
// @version 1.7.7
2+
// @version 1.7.8
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
@@ -567,7 +567,7 @@
567567
var comments, is_live;
568568
comments = document.getElementById("watch-discussion");
569569
is_live = window.ytplayer && window.ytplayer.config && window.ytplayer.config.args && window.ytplayer.config.args.livestream;
570-
if (a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
570+
if (!window.location.search.match(/&?lc=/) && a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
571571
comments.lazyload = arguments;
572572
} else {
573573
return original.apply(this, arguments);
@@ -1730,6 +1730,9 @@
17301730
modComments.wrapper = setLocale(modComments.wrapper.content).firstChild;
17311731
document.addEventListener("click", loadComments);
17321732
modComments.comments.parentNode.insertBefore(modComments.wrapper, modComments.comments);
1733+
if (window.location.search.match(/&?lc=/)) {
1734+
modComments.wrapper.querySelector("button").click();
1735+
}
17331736
}
17341737
}
17351738
function setCustomStyles(clss) {
@@ -1804,7 +1807,7 @@
18041807
) {
18051808
sidebar.outerHTML = "";
18061809
}
1807-
if (window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
1810+
if (!window.location.search.match(/&?lc=/) && window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
18081811
comments.outerHTML = "";
18091812
}
18101813
if (user_settings.VID_HIDE_COMS === "1") {
@@ -2089,8 +2092,8 @@
20892092
temp = document.createElement("template");
20902093
temp.innerHTML = //
20912094
`<div id='material-notice' style='border-radius:2px;color:#FFF;padding:10px;background-color:#09F;box-shadow:0 0 3px rgba(0,0,0,.5);font-size:12px;position:fixed;bottom:20px;right:20px;z-index:99999'>
2092-
YouTube Plus is not yet compatible with the YouTube beta Material Layout<br>
2093-
<a href='https://github.com/ParticleCore/Particle/wiki/Restore-classic-YouTube' target='_blank' style='color:#FFF;font-weight:bold;'>Click here</a> for instructions to restore classic YouTube and continue using YT+<br>
2095+
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
2096+
The development of YouTube Plus might end when this layout is officially launched, <a href='https://github.com/ParticleCore/Particle/issues/448' target='_blank' style='color:#FFF;font-weight:bold;'>click here</a> to read the announcement<br>
20942097
To keep using the current layout without this message please disable YT+
20952098
</div>`;
20962099
document.documentElement.appendChild(temp.content.firstChild);
@@ -2333,7 +2336,7 @@
23332336
holder = document.createElement("link");
23342337
holder.rel = "stylesheet";
23352338
holder.type = "text/css";
2336-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.7";
2339+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.8";
23372340
document.documentElement.appendChild(holder);
23382341
}
23392342
holder = document.createElement("script");

src/Webextension/JS/YouTubePlus.user.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==UserScript==
2-
// @version 1.7.7
2+
// @version 1.7.8
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
@@ -567,7 +567,7 @@
567567
var comments, is_live;
568568
comments = document.getElementById("watch-discussion");
569569
is_live = window.ytplayer && window.ytplayer.config && window.ytplayer.config.args && window.ytplayer.config.args.livestream;
570-
if (a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
570+
if (!window.location.search.match(/&?lc=/) && a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
571571
comments.lazyload = arguments;
572572
} else {
573573
return original.apply(this, arguments);
@@ -1730,6 +1730,9 @@
17301730
modComments.wrapper = setLocale(modComments.wrapper.content).firstChild;
17311731
document.addEventListener("click", loadComments);
17321732
modComments.comments.parentNode.insertBefore(modComments.wrapper, modComments.comments);
1733+
if (window.location.search.match(/&?lc=/)) {
1734+
modComments.wrapper.querySelector("button").click();
1735+
}
17331736
}
17341737
}
17351738
function setCustomStyles(clss) {
@@ -1804,7 +1807,7 @@
18041807
) {
18051808
sidebar.outerHTML = "";
18061809
}
1807-
if (window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
1810+
if (!window.location.search.match(/&?lc=/) && window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
18081811
comments.outerHTML = "";
18091812
}
18101813
if (user_settings.VID_HIDE_COMS === "1") {
@@ -2089,8 +2092,8 @@
20892092
temp = document.createElement("template");
20902093
temp.innerHTML = //
20912094
`<div id='material-notice' style='border-radius:2px;color:#FFF;padding:10px;background-color:#09F;box-shadow:0 0 3px rgba(0,0,0,.5);font-size:12px;position:fixed;bottom:20px;right:20px;z-index:99999'>
2092-
YouTube Plus is not yet compatible with the YouTube beta Material Layout<br>
2093-
<a href='https://github.com/ParticleCore/Particle/wiki/Restore-classic-YouTube' target='_blank' style='color:#FFF;font-weight:bold;'>Click here</a> for instructions to restore classic YouTube and continue using YT+<br>
2095+
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
2096+
The development of YouTube Plus might end when this layout is officially launched, <a href='https://github.com/ParticleCore/Particle/issues/448' target='_blank' style='color:#FFF;font-weight:bold;'>click here</a> to read the announcement<br>
20942097
To keep using the current layout without this message please disable YT+
20952098
</div>`;
20962099
document.documentElement.appendChild(temp.content.firstChild);
@@ -2333,7 +2336,7 @@
23332336
holder = document.createElement("link");
23342337
holder.rel = "stylesheet";
23352338
holder.type = "text/css";
2336-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.7";
2339+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.8";
23372340
document.documentElement.appendChild(holder);
23382341
}
23392342
holder = document.createElement("script");

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

0 commit comments

Comments
 (0)