|
1 | 1 | // ==UserScript== |
2 | | -// @version 1.7.7 |
| 2 | +// @version 1.7.8 |
3 | 3 | // @name YouTube + |
4 | 4 | // @namespace https://github.com/ParticleCore |
5 | 5 | // @description YouTube with more freedom |
|
567 | 567 | var comments, is_live; |
568 | 568 | comments = document.getElementById("watch-discussion"); |
569 | 569 | 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")) { |
571 | 571 | comments.lazyload = arguments; |
572 | 572 | } else { |
573 | 573 | return original.apply(this, arguments); |
|
1730 | 1730 | modComments.wrapper = setLocale(modComments.wrapper.content).firstChild; |
1731 | 1731 | document.addEventListener("click", loadComments); |
1732 | 1732 | modComments.comments.parentNode.insertBefore(modComments.wrapper, modComments.comments); |
| 1733 | + if (window.location.search.match(/&?lc=/)) { |
| 1734 | + modComments.wrapper.querySelector("button").click(); |
| 1735 | + } |
1733 | 1736 | } |
1734 | 1737 | } |
1735 | 1738 | function setCustomStyles(clss) { |
|
1804 | 1807 | ) { |
1805 | 1808 | sidebar.outerHTML = ""; |
1806 | 1809 | } |
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) { |
1808 | 1811 | comments.outerHTML = ""; |
1809 | 1812 | } |
1810 | 1813 | if (user_settings.VID_HIDE_COMS === "1") { |
|
2089 | 2092 | temp = document.createElement("template"); |
2090 | 2093 | temp.innerHTML = // |
2091 | 2094 | `<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> |
2094 | 2097 | To keep using the current layout without this message please disable YT+ |
2095 | 2098 | </div>`; |
2096 | 2099 | document.documentElement.appendChild(temp.content.firstChild); |
|
2333 | 2336 | holder = document.createElement("link"); |
2334 | 2337 | holder.rel = "stylesheet"; |
2335 | 2338 | 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"; |
2337 | 2340 | document.documentElement.appendChild(holder); |
2338 | 2341 | } |
2339 | 2342 | holder = document.createElement("script"); |
|
0 commit comments