diff options
-rw-r--r-- | src/content.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/content.ts b/src/content.ts index c62865b2..b4d16964 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2634,11 +2634,11 @@ function showTimeWithoutSkips(skippedDuration: number): void { } // YouTube player time display - const displayClass = - isOnInvidious() ? "vjs-duration" : - isOnMobileYouTube() ? "ytm-time-display" : - "ytp-time-display.notranslate"; - const display = document.querySelector(`.${displayClass}`); + const selector = + isOnInvidious() ? ".vjs-duration" : + isOnMobileYouTube() ? ".ytm-time-display" : + ".ytp-time-display.notranslate .ytp-time-wrapper"; + const display = document.querySelector(selector); if (!display) return; const durationID = "sponsorBlockDurationAfterSkips"; @@ -2648,7 +2648,6 @@ function showTimeWithoutSkips(skippedDuration: number): void { if (duration === null) { duration = document.createElement('span'); duration.id = durationID; - if (!isOnInvidious()) duration.classList.add(displayClass); display.appendChild(duration); } |