Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/code-charity/youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed May 18, 2023
2 parents 1099440 + 8eb71b3 commit 8817b09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions js&css/satus.css
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,7 @@ As our Syntax markup isnt read for <textarea>, is it?
border: none;

appearance: none;
z-index: 1;
}

.satus-checkbox__checkmark {
Expand Down
9 changes: 7 additions & 2 deletions js&css/web-accessible/www.youtube.com/playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,18 @@ ImprovedTube.playlistReverse = function () {
4.5.3 REPEAT
------------------------------------------------------------------------------*/
ImprovedTube.playlistRepeat = function () {
var option = ImprovedTube.storage.playlist_repeat,
if ( ImprovedTube.storage.playlist_repeat === true ) {
var option = ImprovedTube.storage.playlist_repeat,
button = document.querySelector("ytd-playlist-loop-button-renderer button"),
svg = button.querySelector("path").attributes.d.textContent.split(" ")[0];
if (button && ((option === true && svg !== 'M20,14h2v5L5.84,19.02l1.77,1.77l-1.41,1.41L1.99,18l4.21-4.21l1.41,1.41l-1.82,1.82L20,17V14z')
|| (option === false && svg !== 'M21,13h1v5L3.93,18.03l2.62,2.62l-0.71,0.71L1.99,17.5l3.85-3.85l0.71,0.71l-2.67,2.67L21,17V13z'))) {
// || (option === false && svg !== 'M21,13h1v5L3.93,18.03l2.62,2.62l-0.71,0.71L1.99,17.5l3.85-3.85l0.71,0.71l-2.67,2.67L21,17V13z')
)) {
button.click();
if (tryAgain < 2) { tryAgain++;
setTimeout(function () {ImprovedTube.playlistRepeat()}, 10000);
}
}
}
};

Expand Down
5 changes: 3 additions & 2 deletions menu/skeleton-parts/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ extension.skeleton.main.layers.section.player.on.click = {
component: 'switch',
text: 'autoPip',
id: 'player_autoPip',
value: false,
on: {
click: function () {
if (this.dataset.value === 'true' && satus.storage.get('player_autopause_when_switching_tabs')) {
Expand Down Expand Up @@ -778,6 +777,7 @@ extension.skeleton.main.layers.section.player.on.click = {
block_vp9: {
component: 'switch',
text: 'blockVp9',
value: false,
custom: true,
on: {
click: function () {
Expand Down Expand Up @@ -809,6 +809,7 @@ extension.skeleton.main.layers.section.player.on.click = {
block_h264: {
component: 'switch',
text: 'blockH264',
value: false,
custom: true,
on: {
click: function () {
Expand Down Expand Up @@ -875,6 +876,7 @@ extension.skeleton.main.layers.section.player.on.click = {
component: 'switch',
text: 'codecH264',
storage: 'player_h264',
value: false,
custom: true,
on: {
click: function () {
Expand Down Expand Up @@ -962,7 +964,6 @@ extension.skeleton.main.layers.section.player.on.click = {
sdr: {
component: 'switch',
text: 'forceSDR',
value: false,
storage: 'player_SDR'
}
},
Expand Down

0 comments on commit 8817b09

Please sign in to comment.