Skip to content

Commit

Permalink
Update init.js call channelPlayAllButton only on channel page
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored Jun 23, 2024
1 parent 34b37b9 commit 5e5fd7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js&css/web-accessible/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,20 @@ 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) {
ImprovedTube.videoPageUpdate();
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();
}
});

Expand Down

0 comments on commit 5e5fd7c

Please sign in to comment.