From 5e5fd7c26fac41e17cbdebfee5d656fe8255a80f Mon Sep 17 00:00:00 2001 From: Rasz_pl Date: Sun, 23 Jun 2024 04:15:25 +0200 Subject: [PATCH] Update init.js call channelPlayAllButton only on channel page --- js&css/web-accessible/init.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js&css/web-accessible/init.js b/js&css/web-accessible/init.js index 66c09bcd9..34ea02155 100644 --- a/js&css/web-accessible/init.js +++ b/js&css/web-accessible/init.js @@ -146,7 +146,7 @@ document.addEventListener('yt-navigate-finish', function () { // if(node.getAttribute('itemprop') === 'uploadDate') {ImprovedTube.uploadDate = node.content;} */ ImprovedTube.pageType(); - if(ImprovedTube.storage.undo_the_new_sidebar === true){ImprovedTube.undoTheNewSidebar();} + if (ImprovedTube.storage.undo_the_new_sidebar) { ImprovedTube.undoTheNewSidebar(); } ImprovedTube.commentsSidebar(); if (ImprovedTube.elements.player && ImprovedTube.elements.player.setPlaybackRate) { @@ -154,11 +154,12 @@ document.addEventListener('yt-navigate-finish', function () { ImprovedTube.initPlayer(); } - ImprovedTube.channelPlayAllButton(); if (document.documentElement.dataset.pageType === 'home' && ImprovedTube.storage.youtube_home_page === 'search' ) { document.querySelector('body').style.setProperty('visibility', 'visible', 'important'); ImprovedTube.shortcutGoToSearchBox(); document.querySelector('#search').click(); + } else if (document.documentElement.dataset.pageType === 'channel') { + ImprovedTube.channelPlayAllButton(); } });