From 34aded725d4d0a91a37590898c35c672cfcf4a95 Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 4 Jul 2023 21:51:50 +0200 Subject: [PATCH] Add plugin to always use the compact sidebar --- plugins/compact-sidebar/front.js | 10 ++++++++++ readme.md | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 plugins/compact-sidebar/front.js diff --git a/plugins/compact-sidebar/front.js b/plugins/compact-sidebar/front.js new file mode 100644 index 00000000..a45e5f72 --- /dev/null +++ b/plugins/compact-sidebar/front.js @@ -0,0 +1,10 @@ +module.exports = () => { + const compactSidebar = document.querySelector("#mini-guide"); + const isCompactSidebarDisabled = + compactSidebar === null || + window.getComputedStyle(compactSidebar).display === "none"; + + if (isCompactSidebarDisabled) { + document.querySelector("#button").click(); + } +}; diff --git a/readme.md b/readme.md index a25c79c5..587204f3 100644 --- a/readme.md +++ b/readme.md @@ -69,6 +69,8 @@ winget install th-ch.YouTubeMusic - **Captions selector**: Enable captions +- **Compact sidebar**: Always set the sidebar in compact mode + - **Crossfade**: Crossfade between songs - **Disable Autoplay**: Makes every song start in "paused" mode