Skip to content

Commit

Permalink
quickfix #1683
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed May 18, 2023
1 parent d5976b5 commit 502681e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions js&css/web-accessible/www.youtube.com/playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,14 @@ ImprovedTube.playlistReverse = function () {
------------------------------------------------------------------------------*/
ImprovedTube.playlistRepeat = function () {
if ( ImprovedTube.storage.playlist_repeat === true ) {
setTimeout(function (){
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')
)) {
button.click();
if (tryAgain < 2) { tryAgain++;
setTimeout(function () {ImprovedTube.playlistRepeat()}, 10000);
}
}
)) { button.click(); }
}, 5000);
}
};
/*------------------------------------------------------------------------------
Expand Down

0 comments on commit 502681e

Please sign in to comment.