From b8d6d4a0b35bde65e9b187035ad6b04b45900c98 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 15 Sep 2022 23:37:11 -0400 Subject: [PATCH] Handle preview bar hover without js --- public/content.css | 2 +- src/js-components/previewBar.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/public/content.css b/public/content.css index e9d3f483..deb30196 100644 --- a/public/content.css +++ b/public/content.css @@ -34,7 +34,7 @@ height: 3px; } -#previewbar.hovered { +div:hover > #previewbar.sbNotInvidious { transform: scaleY(1) } diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 6123715f..3f897dd4 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -196,10 +196,7 @@ class PreviewBar { this.container.style.transform = "none"; } else if (!this.onInvidious) { - // Hover listener - this.parent.addEventListener("mouseenter", () => this.container.classList.add("hovered")); - - this.parent.addEventListener("mouseleave", () => this.container.classList.remove("hovered")); + this.container.classList.add("sbNotInvidious"); } // On the seek bar