From 22ecc05a5509ad37e78b041c4ca15c07cb923cbe Mon Sep 17 00:00:00 2001 From: FlorianZahn Date: Mon, 20 Sep 2021 15:32:31 +0200 Subject: [PATCH] Highlight Button now persists --- src/js-components/skipButtonControlBar.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts index 1ea03724..794ec937 100644 --- a/src/js-components/skipButtonControlBar.ts +++ b/src/js-components/skipButtonControlBar.ts @@ -84,7 +84,7 @@ export class SkipButtonControlBar { startTimer(): void { this.stopTimer(); - this.timeout = setTimeout(() => this.disable(), Math.max(Config.config.skipNoticeDuration, this.duration) * 1000); + this.timeout = setTimeout(() => this.innerTextVanish(), Math.max(Config.config.skipNoticeDuration, this.duration) * 1000); } disable(): void { @@ -94,7 +94,12 @@ export class SkipButtonControlBar { toggleSkip(): void { this.skip(this.segment); - this.disable(); + this.innerTextVanish(); + } + + innerTextVanish(): void { + this.textContainer.innerText = ""; + this.chapterText?.classList?.remove("hidden"); } }