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;