From 36ddb274894df1d113919e1888e2629309e8297c Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Fri, 29 Sep 2023 17:24:32 +0200 Subject: [PATCH] #1768 --- js&css/web-accessible/www.youtube.com/playlist.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js&css/web-accessible/www.youtube.com/playlist.js b/js&css/web-accessible/www.youtube.com/playlist.js index e2915e124..1606669ee 100644 --- a/js&css/web-accessible/www.youtube.com/playlist.js +++ b/js&css/web-accessible/www.youtube.com/playlist.js @@ -102,8 +102,7 @@ ImprovedTube.playlistRepeat = function () { setTimeout(function (){ var option = ImprovedTube.storage.playlist_repeat, button = document.querySelector("#button.ytd-playlist-loop-button-renderer") || document.querySelector("ytd-playlist-loop-button-renderer button") || document.querySelector("ytd-playlist-loop-button-renderer"); - svg = button.querySelector("path").attributes.d.textContent.split(" ")[0]; - if (button && (option === true && svg.startsWith('M21') + if (button && (option === true && button.querySelector("path").attributes.d.textContent.split(" ")[0];.startsWith('M21') ) && button.querySelector("#tooltip")?.textContent !== 'Loop video' && button.firstElementChild?.firstElementChild?.attributes[2]?.textContent !== 'Loop video' && button.querySelector("#tooltip")?.textContent !== 'Turn off loop' @@ -125,8 +124,7 @@ ImprovedTube.playlistShuffle = function () { var button = ImprovedTube.elements.playlist.shuffle_button, option = ImprovedTube.storage.playlist_shuffle; button = document.querySelector('#playlist-actions #playlist-action-menu ytd-toggle-button-renderer'); - svg = button.querySelector("path").attributes.d.textContent.split(" ")[0]; - if (button && (option === true && svg.startsWith('M18.1') + if (button && (option === true && button.querySelector("path").attributes.d.textContent.split(" ")[0].startsWith('M18.1') ) ) { button.click(); } }, 5000);