diff --git a/bin/update.json b/bin/update.json
index 416cd07..530089d 100644
--- a/bin/update.json
+++ b/bin/update.json
@@ -2,7 +2,7 @@
"addons": {
"unlisted-particle@particlecore.github.io": {
"updates": [{
- "version": "1.7.7",
+ "version": "1.7.8",
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
"applications": {
"gecko": {
diff --git a/dist/YouTubePlus.xpi b/dist/YouTubePlus.xpi
index 5d1ee3c..2e4d2c0 100644
Binary files a/dist/YouTubePlus.xpi and b/dist/YouTubePlus.xpi differ
diff --git a/src/Userscript/YouTubePlus.user.js b/src/Userscript/YouTubePlus.user.js
index 60e145a..7ee87a7 100644
--- a/src/Userscript/YouTubePlus.user.js
+++ b/src/Userscript/YouTubePlus.user.js
@@ -1,5 +1,5 @@
// ==UserScript==
-// @version 1.7.7
+// @version 1.7.8
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
@@ -567,7 +567,7 @@
var comments, is_live;
comments = document.getElementById("watch-discussion");
is_live = window.ytplayer && window.ytplayer.config && window.ytplayer.config.args && window.ytplayer.config.args.livestream;
- if (a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
+ 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")) {
comments.lazyload = arguments;
} else {
return original.apply(this, arguments);
@@ -1730,6 +1730,9 @@
modComments.wrapper = setLocale(modComments.wrapper.content).firstChild;
document.addEventListener("click", loadComments);
modComments.comments.parentNode.insertBefore(modComments.wrapper, modComments.comments);
+ if (window.location.search.match(/&?lc=/)) {
+ modComments.wrapper.querySelector("button").click();
+ }
}
}
function setCustomStyles(clss) {
@@ -1804,7 +1807,7 @@
) {
sidebar.outerHTML = "";
}
- if (window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
+ if (!window.location.search.match(/&?lc=/) && window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
comments.outerHTML = "";
}
if (user_settings.VID_HIDE_COMS === "1") {
@@ -2089,8 +2092,8 @@
temp = document.createElement("template");
temp.innerHTML = //
`
- YouTube Plus is not yet compatible with the YouTube beta Material Layout
-
Click here for instructions to restore classic YouTube and continue using YT+
+ YouTube Plus is not compatible with the YouTube beta Material Layout
+ The development of YouTube Plus might end when this layout is officially launched,
click here to read the announcement
To keep using the current layout without this message please disable YT+
`;
document.documentElement.appendChild(temp.content.firstChild);
@@ -2333,7 +2336,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
- holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.7";
+ holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.8";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
diff --git a/src/Webextension/JS/YouTubePlus.user.js b/src/Webextension/JS/YouTubePlus.user.js
index 60e145a..7ee87a7 100644
--- a/src/Webextension/JS/YouTubePlus.user.js
+++ b/src/Webextension/JS/YouTubePlus.user.js
@@ -1,5 +1,5 @@
// ==UserScript==
-// @version 1.7.7
+// @version 1.7.8
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
@@ -567,7 +567,7 @@
var comments, is_live;
comments = document.getElementById("watch-discussion");
is_live = window.ytplayer && window.ytplayer.config && window.ytplayer.config.args && window.ytplayer.config.args.livestream;
- if (a.split("comments").length > 1 && !is_live && comments && !comments.lazyload && user_settings.VID_HIDE_COMS === "1" && !comments.classList.contains("show")) {
+ 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")) {
comments.lazyload = arguments;
} else {
return original.apply(this, arguments);
@@ -1730,6 +1730,9 @@
modComments.wrapper = setLocale(modComments.wrapper.content).firstChild;
document.addEventListener("click", loadComments);
modComments.comments.parentNode.insertBefore(modComments.wrapper, modComments.comments);
+ if (window.location.search.match(/&?lc=/)) {
+ modComments.wrapper.querySelector("button").click();
+ }
}
}
function setCustomStyles(clss) {
@@ -1804,7 +1807,7 @@
) {
sidebar.outerHTML = "";
}
- if (window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
+ if (!window.location.search.match(/&?lc=/) && window.location.pathname === "/watch" && user_settings.VID_HIDE_COMS > 1 && comments) {
comments.outerHTML = "";
}
if (user_settings.VID_HIDE_COMS === "1") {
@@ -2089,8 +2092,8 @@
temp = document.createElement("template");
temp.innerHTML = //
`
- YouTube Plus is not yet compatible with the YouTube beta Material Layout
-
Click here for instructions to restore classic YouTube and continue using YT+
+ YouTube Plus is not compatible with the YouTube beta Material Layout
+ The development of YouTube Plus might end when this layout is officially launched,
click here to read the announcement
To keep using the current layout without this message please disable YT+
`;
document.documentElement.appendChild(temp.content.firstChild);
@@ -2333,7 +2336,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
- holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.7";
+ holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.7.8";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
diff --git a/src/Webextension/manifest.json b/src/Webextension/manifest.json
index 551a7eb..8fb1fa5 100644
--- a/src/Webextension/manifest.json
+++ b/src/Webextension/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "YouTube Plus",
- "version": "1.7.7",
+ "version": "1.7.8",
"description": "YouTube with more freedom",
"default_locale": "en",
"icons": {