Add option to not auto-hide info button

This commit is contained in:
Ajay Ramachandran
2021-06-27 18:50:52 -04:00
parent cc73d2a179
commit 91f3ebed41
5 changed files with 30 additions and 4 deletions

View File

@@ -1186,7 +1186,8 @@ async function createButtons(): Promise<void> {
createButton("info", "openPopup", openInfoMenu, "PlayerInfoIconSponsorBlocker.svg");
const controlsContainer = getControls();
if (!onInvidious && controlsContainer && playerButtons["info"]?.button && !controlsWithEventListeners.includes(controlsContainer)) {
if (Config.config.autoHideInfoButton && !onInvidious && controlsContainer
&& playerButtons["info"]?.button && !controlsWithEventListeners.includes(controlsContainer)) {
controlsWithEventListeners.push(controlsContainer);
playerButtons["info"].button.classList.add("hidden");