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

Commit 9e97cb8

Browse files
committed
1.8.5
- 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
1 parent 3af606f commit 9e97cb8

10 files changed

Lines changed: 82 additions & 30 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.8.4",
5+
"version": "1.8.5",
66
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
77
"applications": {
88
"gecko": {

dist/Particle.nex

149 Bytes
Binary file not shown.

dist/YouTubePlus.xpi

144 Bytes
Binary file not shown.

src/Opera/CSS/YouTubePlus.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,24 @@
393393
.part_popout{
394394
overflow: hidden;
395395
}
396+
.part_popout body:after {
397+
content: "";
398+
display: block;
399+
position: fixed;
400+
top: 0;
401+
bottom: 0;
402+
left: 0;
403+
right: 0;
404+
background: black;
405+
}
396406
.part_popout #masthead-positioner,
397407
.part_popout #masthead-positioner-height-offset,
398408
.part_popout .ytp-size-button{
399409
display: none;
400410
}
401411
.part_popout #player-api,
402412
.part_popout #player-api #movie_player{
413+
margin: 0 !important;
403414
position: fixed !important;
404415
bottom: 0 !important;
405416
left: 0 !important;

src/Opera/JS/YouTubePlus.user.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ==UserScript==
2-
// @version 1.8.4
2+
// @version 1.8.5
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
6-
// @compatible chrome
76
// @compatible firefox
7+
// @compatible opera
88
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
99
// @match *://www.youtube.com/*
1010
// @exclude *://www.youtube.com/tv*
@@ -1223,7 +1223,7 @@
12231223
temp = modThumbs.thumbs[list[i]];
12241224
j = temp.length;
12251225
while (j--) {
1226-
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
1226+
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
12271227
if (thumb) {
12281228
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
12291229
button = document.createElement("template");
@@ -1307,8 +1307,13 @@
13071307
}
13081308
}
13091309
function getVideos() {
1310-
var i, list, temp, channel_id;
1310+
var i, list, temp, video_list, channel_id;
13111311
modThumbs.thumbs = {};
1312+
video_list = Array.from(document.querySelectorAll(`
1313+
.yt-shelf-grid-item,
1314+
.video-list-item,
1315+
.item-section > li
1316+
`));
13121317
list = document.querySelectorAll(`
13131318
.yt-lockup-byline > a,
13141319
.yt-lockup-content .g-hovercard,
@@ -1320,7 +1325,7 @@
13201325
temp = list[i];
13211326
channel_id = temp.dataset.ytid;
13221327
while (temp) {
1323-
if (temp.tagName && temp.tagName === "LI") {
1328+
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
13241329
temp.username = list[i].textContent;
13251330
if (!modThumbs.thumbs[channel_id]) {
13261331
modThumbs.thumbs[channel_id] = [temp];
@@ -1747,7 +1752,7 @@
17471752
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
17481753
}
17491754
function customStyles() {
1750-
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
1755+
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
17511756
comments = document.getElementById("watch-discussion");
17521757
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
17531758
customStyles.custom_styles = {
@@ -1771,6 +1776,12 @@
17711776
}
17721777
if (window.name === "popOut") {
17731778
document.documentElement.classList.add("part_popout");
1779+
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
1780+
height = Math.round(width / (16 / 9));
1781+
window.resizeTo(
1782+
width + (window.outerWidth - window.innerWidth),
1783+
height + (window.outerHeight - window.innerHeight)
1784+
);
17741785
}
17751786
if (ytGrid && user_settings.GEN_GRID_SUBS) {
17761787
ytGrid.click();
@@ -2120,8 +2131,7 @@
21202131
`<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'>
21212132
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
21222133
<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>
2123-
The development of YT+ might end when this layout is launched permanently,<br>
2124-
<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>
2134+
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>
21252135
To keep using the current layout without this message please disable YT+
21262136
</div>`;
21272137
document.documentElement.appendChild(temp.content.firstChild);
@@ -2365,7 +2375,7 @@
23652375
holder = document.createElement("link");
23662376
holder.rel = "stylesheet";
23672377
holder.type = "text/css";
2368-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
2378+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
23692379
document.documentElement.appendChild(holder);
23702380
}
23712381
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.4",
4+
"version": "1.8.5",
55
"description": "YouTube with more freedom",
66
"default_locale": "en",
77
"icons": {

src/Userscript/YouTubePlus.user.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ==UserScript==
2-
// @version 1.8.4
2+
// @version 1.8.5
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
6-
// @compatible chrome
76
// @compatible firefox
7+
// @compatible opera
88
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
99
// @match *://www.youtube.com/*
1010
// @exclude *://www.youtube.com/tv*
@@ -1223,7 +1223,7 @@
12231223
temp = modThumbs.thumbs[list[i]];
12241224
j = temp.length;
12251225
while (j--) {
1226-
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
1226+
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
12271227
if (thumb) {
12281228
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
12291229
button = document.createElement("template");
@@ -1307,8 +1307,13 @@
13071307
}
13081308
}
13091309
function getVideos() {
1310-
var i, list, temp, channel_id;
1310+
var i, list, temp, video_list, channel_id;
13111311
modThumbs.thumbs = {};
1312+
video_list = Array.from(document.querySelectorAll(`
1313+
.yt-shelf-grid-item,
1314+
.video-list-item,
1315+
.item-section > li
1316+
`));
13121317
list = document.querySelectorAll(`
13131318
.yt-lockup-byline > a,
13141319
.yt-lockup-content .g-hovercard,
@@ -1320,7 +1325,7 @@
13201325
temp = list[i];
13211326
channel_id = temp.dataset.ytid;
13221327
while (temp) {
1323-
if (temp.tagName && temp.tagName === "LI") {
1328+
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
13241329
temp.username = list[i].textContent;
13251330
if (!modThumbs.thumbs[channel_id]) {
13261331
modThumbs.thumbs[channel_id] = [temp];
@@ -1747,7 +1752,7 @@
17471752
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
17481753
}
17491754
function customStyles() {
1750-
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
1755+
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
17511756
comments = document.getElementById("watch-discussion");
17521757
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
17531758
customStyles.custom_styles = {
@@ -1771,6 +1776,12 @@
17711776
}
17721777
if (window.name === "popOut") {
17731778
document.documentElement.classList.add("part_popout");
1779+
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
1780+
height = Math.round(width / (16 / 9));
1781+
window.resizeTo(
1782+
width + (window.outerWidth - window.innerWidth),
1783+
height + (window.outerHeight - window.innerHeight)
1784+
);
17741785
}
17751786
if (ytGrid && user_settings.GEN_GRID_SUBS) {
17761787
ytGrid.click();
@@ -2120,8 +2131,7 @@
21202131
`<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'>
21212132
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
21222133
<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>
2123-
The development of YT+ might end when this layout is launched permanently,<br>
2124-
<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>
2134+
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>
21252135
To keep using the current layout without this message please disable YT+
21262136
</div>`;
21272137
document.documentElement.appendChild(temp.content.firstChild);
@@ -2365,7 +2375,7 @@
23652375
holder = document.createElement("link");
23662376
holder.rel = "stylesheet";
23672377
holder.type = "text/css";
2368-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
2378+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
23692379
document.documentElement.appendChild(holder);
23702380
}
23712381
holder = document.createElement("script");

src/Webextension/CSS/YouTubePlus.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,24 @@
393393
.part_popout{
394394
overflow: hidden;
395395
}
396+
.part_popout body:after {
397+
content: "";
398+
display: block;
399+
position: fixed;
400+
top: 0;
401+
bottom: 0;
402+
left: 0;
403+
right: 0;
404+
background: black;
405+
}
396406
.part_popout #masthead-positioner,
397407
.part_popout #masthead-positioner-height-offset,
398408
.part_popout .ytp-size-button{
399409
display: none;
400410
}
401411
.part_popout #player-api,
402412
.part_popout #player-api #movie_player{
413+
margin: 0 !important;
403414
position: fixed !important;
404415
bottom: 0 !important;
405416
left: 0 !important;

src/Webextension/JS/YouTubePlus.user.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ==UserScript==
2-
// @version 1.8.4
2+
// @version 1.8.5
33
// @name YouTube +
44
// @namespace https://github.com/ParticleCore
55
// @description YouTube with more freedom
6-
// @compatible chrome
76
// @compatible firefox
7+
// @compatible opera
88
// @icon https://raw.githubusercontent.com/ParticleCore/Particle/gh-pages/images/YT%2Bicon.png
99
// @match *://www.youtube.com/*
1010
// @exclude *://www.youtube.com/tv*
@@ -1223,7 +1223,7 @@
12231223
temp = modThumbs.thumbs[list[i]];
12241224
j = temp.length;
12251225
while (j--) {
1226-
thumb = temp[j].querySelector(".yt-lockup-thumbnail, .thumb-wrapper");
1226+
thumb = temp[j].querySelector(".yt-lockup .yt-lockup-thumbnail, .thumb-wrapper");
12271227
if (thumb) {
12281228
if (user_settings.GEN_PPOT_ON && !thumb.querySelector(".popoutmode") && !/channel/.test(temp[j].firstChild.className)) {
12291229
button = document.createElement("template");
@@ -1307,8 +1307,13 @@
13071307
}
13081308
}
13091309
function getVideos() {
1310-
var i, list, temp, channel_id;
1310+
var i, list, temp, video_list, channel_id;
13111311
modThumbs.thumbs = {};
1312+
video_list = Array.from(document.querySelectorAll(`
1313+
.yt-shelf-grid-item,
1314+
.video-list-item,
1315+
.item-section > li
1316+
`));
13121317
list = document.querySelectorAll(`
13131318
.yt-lockup-byline > a,
13141319
.yt-lockup-content .g-hovercard,
@@ -1320,7 +1325,7 @@
13201325
temp = list[i];
13211326
channel_id = temp.dataset.ytid;
13221327
while (temp) {
1323-
if (temp.tagName && temp.tagName === "LI") {
1328+
if (temp.tagName && temp.tagName === "LI" && video_list.indexOf(temp) > -1) {
13241329
temp.username = list[i].textContent;
13251330
if (!modThumbs.thumbs[channel_id]) {
13261331
modThumbs.thumbs[channel_id] = [temp];
@@ -1747,7 +1752,7 @@
17471752
document.documentElement.classList[user_settings[clss] ? "add" : "remove"](customStyles.custom_styles[clss]);
17481753
}
17491754
function customStyles() {
1750-
var child, parent, comments, sidebar, ytGrid, adverts, ads_list;
1755+
var child, width, height, parent, comments, sidebar, ytGrid, adverts, ads_list;
17511756
comments = document.getElementById("watch-discussion");
17521757
ytGrid = document.querySelector(".yt-uix-menu-top-level-flow-button:last-child a");
17531758
customStyles.custom_styles = {
@@ -1771,6 +1776,12 @@
17711776
}
17721777
if (window.name === "popOut") {
17731778
document.documentElement.classList.add("part_popout");
1779+
width = parseInt(user_settings.VID_PPOT_SZ) || 533;
1780+
height = Math.round(width / (16 / 9));
1781+
window.resizeTo(
1782+
width + (window.outerWidth - window.innerWidth),
1783+
height + (window.outerHeight - window.innerHeight)
1784+
);
17741785
}
17751786
if (ytGrid && user_settings.GEN_GRID_SUBS) {
17761787
ytGrid.click();
@@ -2120,8 +2131,7 @@
21202131
`<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'>
21212132
YouTube Plus is not compatible with the YouTube beta Material Layout<br>
21222133
<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>
2123-
The development of YT+ might end when this layout is launched permanently,<br>
2124-
<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>
2134+
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>
21252135
To keep using the current layout without this message please disable YT+
21262136
</div>`;
21272137
document.documentElement.appendChild(temp.content.firstChild);
@@ -2365,7 +2375,7 @@
23652375
holder = document.createElement("link");
23662376
holder.rel = "stylesheet";
23672377
holder.type = "text/css";
2368-
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.4";
2378+
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.8.5";
23692379
document.documentElement.appendChild(holder);
23702380
}
23712381
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.8.4",
4+
"version": "1.8.5",
55
"description": "YouTube with more freedom",
66
"default_locale": "en",
77
"icons": {

0 commit comments

Comments
 (0)