mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
Potential fix for preview bar disappearing sometimes
This commit is contained in:
@@ -1320,6 +1320,13 @@ function videoElementChange(newVideo: boolean): void {
|
|||||||
setupCategoryPill();
|
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)) {
|
if (previewBar && !utils.findReferenceNode()?.contains(previewBar.container)) {
|
||||||
previewBar.remove();
|
previewBar.remove();
|
||||||
previewBar = null;
|
previewBar = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user