Merge pull request #958 from FlorianZahn/PersistantHighlight

Highlight Button now persists; Implements issue #953
This commit is contained in:
Ajay Ramachandran
2021-09-30 19:33:39 -04:00
committed by GitHub
7 changed files with 112 additions and 51 deletions

View File

@@ -1307,15 +1307,8 @@ async function createButtons(): Promise<void> {
if (Config.config.autoHideInfoButton && !onInvidious && controlsContainer
&& playerButtons["info"]?.button && !controlsWithEventListeners.includes(controlsContainer)) {
controlsWithEventListeners.push(controlsContainer);
playerButtons["info"].button.classList.add("hidden");
controlsContainer.addEventListener("mouseenter", () => {
playerButtons["info"].button.classList.remove("hidden");
});
controlsContainer.addEventListener("mouseleave", () => {
playerButtons["info"].button.classList.add("hidden");
});
utils.setupAutoHideAnimation(playerButtons["info"].button, controlsContainer);
}
}