From 3316072f5d1d06178f80c6d527d707c1ba02cb45 Mon Sep 17 00:00:00 2001 From: Ajay Date: Mon, 5 Sep 2022 00:14:23 -0400 Subject: [PATCH] Fix votes appearing for unsubmitted segments --- public/content.css | 4 ++++ src/render/ChapterVote.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/public/content.css b/public/content.css index de892be8..7b0782d2 100644 --- a/public/content.css +++ b/public/content.css @@ -126,6 +126,10 @@ div:hover > .sponsorBlockChapterBar { vertical-align: top; } +.playerButton.hidden { + display: none !important; +} + /* Removes auto width from being a ytp-player-button */ .sbPlayerDownvote { width: auto !important; diff --git a/src/render/ChapterVote.tsx b/src/render/ChapterVote.tsx index b78a5ce8..1a3f8999 100644 --- a/src/render/ChapterVote.tsx +++ b/src/render/ChapterVote.tsx @@ -37,6 +37,7 @@ export class ChapterVote { setVisibility(show: boolean): void { const newState = { show, + ...(!show ? { segment: null } : {}) }; if (this.ref.current) {