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

Commit

Permalink
1.8.5
Browse files Browse the repository at this point in the history
- Fixed pop out not resizing correctly in Opera
- Improved pop out loading
- Fixed blacklist not working correctly
- Fixed missing blacklist and pop out thumbnail buttons
- Fixed #489
  • Loading branch information
ParticleCore committed Apr 23, 2017
1 parent 3af606f commit 9e97cb8
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bin/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"addons": {
"[email protected]": {
"updates": [{
"version": "1.8.4",
"version": "1.8.5",
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
"applications": {
"gecko": {
Expand Down
Binary file modified dist/Particle.nex
Binary file not shown.
Binary file modified dist/YouTubePlus.xpi
Binary file not shown.
11 changes: 11 additions & 0 deletions src/Opera/CSS/YouTubePlus.css
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,24 @@
.part_popout{
overflow: hidden;
}
.part_popout body:after {
content: "";
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: black;
}
.part_popout #masthead-positioner,
.part_popout #masthead-positioner-height-offset,
.part_popout .ytp-size-button{
display: none;
}
.part_popout #player-api,
.part_popout #player-api #movie_player{
margin: 0 !important;
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
Expand Down
28 changes: 19 additions & 9 deletions src/Opera/JS/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ==UserScript==
// @version 1.8.4
// @version 1.8.5
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
// @compatible chrome
// @compatible firefox
// @compatible opera
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/tv*
Expand Down Expand Up @@ -1223,7 +1223,7 @@
temp = modThumbs.thumbs[list[i]];
j = temp.length;
while (j--) {
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
if (thumb) {
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
button = document.createElement("template");
Expand Down Expand Up @@ -1307,8 +1307,13 @@
}
}
function getVideos() {
var i, list, temp, channel_id;
var i, list, temp, video_list, channel_id;
modThumbs.thumbs = {};
video_list = Array.from(document.querySelectorAll(`
.yt-shelf-grid-item,
.video-list-item,
.item-section > li
`));
list = document.querySelectorAll(`
.yt-lockup-byline > a,
.yt-lockup-content .g-hovercard,
Expand All @@ -1320,7 +1325,7 @@
temp = list[i];
channel_id = temp.dataset.ytid;
while (temp) {
if (temp.tagName && temp.tagName === "LI") {
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
temp.username = list[i].textContent;
if (!modThumbs.thumbs[channel_id]) {
modThumbs.thumbs[channel_id] = [temp];
Expand Down Expand Up @@ -1747,7 +1752,7 @@
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
}
function customStyles() {
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
comments = document.getElementById("watch-discussion");
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
customStyles.custom_styles = {
Expand All @@ -1771,6 +1776,12 @@
}
if (window.name === "popOut") {
document.documentElement.classList.add("part_popout");
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
height = Math.round(width / (16 / 9));
window.resizeTo(
width + (window.outerWidth - window.innerWidth),
height + (window.outerHeight - window.innerHeight)
);
}
if (ytGrid && user_settings.GEN_GRID_SUBS) {
ytGrid.click();
Expand Down Expand Up @@ -2120,8 +2131,7 @@
`<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:50px;z-index:99999'>
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
<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>
The development of YT+ might end when this layout is launched permanently,<br>
<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>
When an alpha version is ready for public testing it will be announced <a href='https://github.com/ParticleCore/Particle/issues/448' target='_blank' style='color:#FFF;font-weight:bold;'>here</a><br>
To keep using the current layout without this message please disable YT+
</div>`;
document.documentElement.appendChild(temp.content.firstChild);
Expand Down Expand Up @@ -2365,7 +2375,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
Expand Down
2 changes: 1 addition & 1 deletion src/Opera/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Particle",
"version": "1.8.4",
"version": "1.8.5",
"description": "YouTube with more freedom",
"default_locale": "en",
"icons": {
Expand Down
28 changes: 19 additions & 9 deletions src/Userscript/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ==UserScript==
// @version 1.8.4
// @version 1.8.5
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
// @compatible chrome
// @compatible firefox
// @compatible opera
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/tv*
Expand Down Expand Up @@ -1223,7 +1223,7 @@
temp = modThumbs.thumbs[list[i]];
j = temp.length;
while (j--) {
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
if (thumb) {
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
button = document.createElement("template");
Expand Down Expand Up @@ -1307,8 +1307,13 @@
}
}
function getVideos() {
var i, list, temp, channel_id;
var i, list, temp, video_list, channel_id;
modThumbs.thumbs = {};
video_list = Array.from(document.querySelectorAll(`
.yt-shelf-grid-item,
.video-list-item,
.item-section > li
`));
list = document.querySelectorAll(`
.yt-lockup-byline > a,
.yt-lockup-content .g-hovercard,
Expand All @@ -1320,7 +1325,7 @@
temp = list[i];
channel_id = temp.dataset.ytid;
while (temp) {
if (temp.tagName && temp.tagName === "LI") {
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
temp.username = list[i].textContent;
if (!modThumbs.thumbs[channel_id]) {
modThumbs.thumbs[channel_id] = [temp];
Expand Down Expand Up @@ -1747,7 +1752,7 @@
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
}
function customStyles() {
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
comments = document.getElementById("watch-discussion");
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
customStyles.custom_styles = {
Expand All @@ -1771,6 +1776,12 @@
}
if (window.name === "popOut") {
document.documentElement.classList.add("part_popout");
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
height = Math.round(width / (16 / 9));
window.resizeTo(
width + (window.outerWidth - window.innerWidth),
height + (window.outerHeight - window.innerHeight)
);
}
if (ytGrid && user_settings.GEN_GRID_SUBS) {
ytGrid.click();
Expand Down Expand Up @@ -2120,8 +2131,7 @@
`<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:50px;z-index:99999'>
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
<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>
The development of YT+ might end when this layout is launched permanently,<br>
<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>
When an alpha version is ready for public testing it will be announced <a href='https://github.com/ParticleCore/Particle/issues/448' target='_blank' style='color:#FFF;font-weight:bold;'>here</a><br>
To keep using the current layout without this message please disable YT+
</div>`;
document.documentElement.appendChild(temp.content.firstChild);
Expand Down Expand Up @@ -2365,7 +2375,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
Expand Down
11 changes: 11 additions & 0 deletions src/Webextension/CSS/YouTubePlus.css
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,24 @@
.part_popout{
overflow: hidden;
}
.part_popout body:after {
content: "";
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: black;
}
.part_popout #masthead-positioner,
.part_popout #masthead-positioner-height-offset,
.part_popout .ytp-size-button{
display: none;
}
.part_popout #player-api,
.part_popout #player-api #movie_player{
margin: 0 !important;
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
Expand Down
28 changes: 19 additions & 9 deletions src/Webextension/JS/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ==UserScript==
// @version 1.8.4
// @version 1.8.5
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
// @compatible chrome
// @compatible firefox
// @compatible opera
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/tv*
Expand Down Expand Up @@ -1223,7 +1223,7 @@
temp = modThumbs.thumbs[list[i]];
j = temp.length;
while (j--) {
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
if (thumb) {
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
button = document.createElement("template");
Expand Down Expand Up @@ -1307,8 +1307,13 @@
}
}
function getVideos() {
var i, list, temp, channel_id;
var i, list, temp, video_list, channel_id;
modThumbs.thumbs = {};
video_list = Array.from(document.querySelectorAll(`
.yt-shelf-grid-item,
.video-list-item,
.item-section > li
`));
list = document.querySelectorAll(`
.yt-lockup-byline > a,
.yt-lockup-content .g-hovercard,
Expand All @@ -1320,7 +1325,7 @@
temp = list[i];
channel_id = temp.dataset.ytid;
while (temp) {
if (temp.tagName && temp.tagName === "LI") {
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
temp.username = list[i].textContent;
if (!modThumbs.thumbs[channel_id]) {
modThumbs.thumbs[channel_id] = [temp];
Expand Down Expand Up @@ -1747,7 +1752,7 @@
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
}
function customStyles() {
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
comments = document.getElementById("watch-discussion");
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
customStyles.custom_styles = {
Expand All @@ -1771,6 +1776,12 @@
}
if (window.name === "popOut") {
document.documentElement.classList.add("part_popout");
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
height = Math.round(width / (16 / 9));
window.resizeTo(
width + (window.outerWidth - window.innerWidth),
height + (window.outerHeight - window.innerHeight)
);
}
if (ytGrid && user_settings.GEN_GRID_SUBS) {
ytGrid.click();
Expand Down Expand Up @@ -2120,8 +2131,7 @@
`<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:50px;z-index:99999'>
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
<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>
The development of YT+ might end when this layout is launched permanently,<br>
<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>
When an alpha version is ready for public testing it will be announced <a href='https://github.com/ParticleCore/Particle/issues/448' target='_blank' style='color:#FFF;font-weight:bold;'>here</a><br>
To keep using the current layout without this message please disable YT+
</div>`;
document.documentElement.appendChild(temp.content.firstChild);
Expand Down Expand Up @@ -2365,7 +2375,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
Expand Down
2 changes: 1 addition & 1 deletion src/Webextension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "YouTube Plus",
"version": "1.8.4",
"version": "1.8.5",
"description": "YouTube with more freedom",
"default_locale": "en",
"icons": {
Expand Down

0 comments on commit 9e97cb8

Please sign in to comment.