mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Potential fix for preview bar disappearing sometimes
This commit is contained in:
parent
6585a4e325
commit
a83e83c1b1
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue