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

Commit

Permalink
1.6.0
Browse files Browse the repository at this point in the history
- Fixed #363
- Restored 0 delay when presenting video thumbnail when autoplay is off
  • Loading branch information
ParticleCore committed Oct 11, 2016
1 parent 22aba74 commit 05d61d2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 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.5.9",
"version": "1.6.0",
"update_link": "https://github.com/ParticleCore/Particle/raw/master/dist/YouTubePlus.xpi",
"applications": {
"gecko": {
Expand Down
Binary file modified dist/YouTubePlus.xpi
Binary file not shown.
21 changes: 17 additions & 4 deletions src/Userscript/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ==UserScript==
// @version 1.5.9
// @version 1.6.0
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
Expand Down Expand Up @@ -1540,9 +1540,22 @@
if (!temp) {
return;
}
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH || 1280);
max_width = document.documentElement.clientWidth >= max_width ? max_width : document.documentElement.clientWidth;
temp = document.documentElement.clientWidth;
is_small = window.innerWidth < 657 ? "" : ".watch-stage-mode ";
if (is_small !== "") {
if (user_settings.VID_PLR_FIT_WDTH) {
if (user_settings.VID_PLR_FIT_WDTH.match("%")) {
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH) / 100 * temp;
} else {
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH);
}
max_width = temp >= max_width ? max_width : temp;
} else {
max_width = temp >= 1280 ? 1280 : temp;
}
} else {
max_width = temp;
}
content = //
`@media screen and (max-width: 656px) {
#player-api,
Expand Down Expand Up @@ -2199,7 +2212,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.5.9";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.6.0";
document.documentElement.appendChild(holder);
}
holder = document.createElement("script");
Expand Down
4 changes: 4 additions & 0 deletions src/Webextension/CSS/YouTubePlus.css
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,10 @@
.watch.watch-stage-mode #player-playlist.watch-player-playlist{
min-width: 0 !important;
}
html:not(.part_autoplayon) .ytp-thumbnail-overlay,
html:not(.part_autoplayon) .ytp-large-play-button{
transition: none !important;
}
#placeholder-player .player-api {
background-color: transparent !important;
}
Expand Down
21 changes: 17 additions & 4 deletions src/Webextension/JS/YouTubePlus.user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ==UserScript==
// @version 1.5.9
// @version 1.6.0
// @name YouTube +
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
Expand Down Expand Up @@ -1540,9 +1540,22 @@
if (!temp) {
return;
}
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH || 1280);
max_width = document.documentElement.clientWidth >= max_width ? max_width : document.documentElement.clientWidth;
temp = document.documentElement.clientWidth;
is_small = window.innerWidth < 657 ? "" : ".watch-stage-mode ";
if (is_small !== "") {
if (user_settings.VID_PLR_FIT_WDTH) {
if (user_settings.VID_PLR_FIT_WDTH.match("%")) {
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH) / 100 * temp;
} else {
max_width = window.parseInt(user_settings.VID_PLR_FIT_WDTH);
}
max_width = temp >= max_width ? max_width : temp;
} else {
max_width = temp >= 1280 ? 1280 : temp;
}
} else {
max_width = temp;
}
content = //
`@media screen and (max-width: 656px) {
#player-api,
Expand Down Expand Up @@ -2199,7 +2212,7 @@
holder = document.createElement("link");
holder.rel = "stylesheet";
holder.type = "text/css";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.5.9";
holder.href = "https://particlecore.github.io/Particle/stylesheets/YouTubePlus.css?v=1.6.0";
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.5.9",
"version": "1.6.0",
"description": "YouTube with more freedom",
"default_locale": "en",
"icons": {
Expand Down

0 comments on commit 05d61d2

Please sign in to comment.