From ff2cec699f82a8a4645eb8522f6b4d0c88649feb Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 4 Nov 2022 16:18:15 -0400 Subject: [PATCH] adjust skip to highlight button behavior to attempt to fix issues --- src/content.ts | 6 +++--- src/js-components/skipButtonControlBar.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content.ts b/src/content.ts index 8bc1cd2f..35d282c2 100644 --- a/src/content.ts +++ b/src/content.ts @@ -383,12 +383,12 @@ function resetValues() { // Reset advert playing flag isAdPlaying = false; + skipButtonControlBar?.disable(); + categoryPill?.setVisibility(false); + for (let i = 0; i < skipNotices.length; i++) { skipNotices.pop()?.close(); } - - skipButtonControlBar?.disable(); - categoryPill?.setVisibility(false); } async function videoIDChange(id: string): Promise { diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts index 7ab86bc9..d78f8a74 100644 --- a/src/js-components/skipButtonControlBar.ts +++ b/src/js-components/skipButtonControlBar.ts @@ -102,6 +102,7 @@ export class SkipButtonControlBar { this.enabled = true; this.refreshText(); + this.container?.classList?.remove("textDisabled"); this.textContainer?.classList?.remove("hidden"); AnimationUtils.disableAutoHideAnimation(this.skipIcon); @@ -134,7 +135,6 @@ export class SkipButtonControlBar { disable(): void { this.container.classList.add("hidden"); - this.textContainer?.classList?.remove("hidden"); this.chapterText?.classList?.remove("hidden"); this.getChapterPrefix()?.classList?.remove("hidden");