diff options
author | Ajay <[email protected]> | 2023-05-24 23:43:41 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2023-05-24 23:43:41 -0400 |
commit | a83e83c1b14cad53e191555513a1c2bec1949a57 (patch) | |
tree | ade0e76f517ef55c148ddbb9168939e06d5e9d66 | |
parent | 6585a4e325d89f751fcefbd167cc9f6ba46813a3 (diff) | |
download | SponsorBlock-a83e83c1b14cad53e191555513a1c2bec1949a57.tar.gz SponsorBlock-a83e83c1b14cad53e191555513a1c2bec1949a57.zip |
Potential fix for preview bar disappearing sometimes
-rw-r--r-- | src/content.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts index c79baa8f..05957c0c 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1320,6 +1320,13 @@ function videoElementChange(newVideo: boolean): void { setupCategoryPill(); } + checkPreviewbarState(); + + // Incase the page is still transitioning, check again in a few seconds + setTimeout(checkPreviewbarState, 5000); +} + +function checkPreviewbarState(): void { if (previewBar && !utils.findReferenceNode()?.contains(previewBar.container)) { previewBar.remove(); previewBar = null; |