aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-05-24 23:43:41 -0400
committerAjay <[email protected]>2023-05-24 23:43:41 -0400
commita83e83c1b14cad53e191555513a1c2bec1949a57 (patch)
treeade0e76f517ef55c148ddbb9168939e06d5e9d66
parent6585a4e325d89f751fcefbd167cc9f6ba46813a3 (diff)
downloadSponsorBlock-a83e83c1b14cad53e191555513a1c2bec1949a57.tar.gz
SponsorBlock-a83e83c1b14cad53e191555513a1c2bec1949a57.zip
Potential fix for preview bar disappearing sometimes
-rw-r--r--src/content.ts7
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;