add infinite wait for hover preview

This commit is contained in:
Michael C
2022-01-19 01:47:43 -05:00
parent b210b22af3
commit e4aa7efd3c
3 changed files with 10 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ import { getCategoryActionType } from "./utils/categoryUtils";
import { SkipButtonControlBar } from "./js-components/skipButtonControlBar";
import { Tooltip } from "./render/Tooltip";
import { getStartTimeFromUrl } from "./utils/urlParser";
import { findValidElement, getControls, getHashParams, isVisible } from "./utils/pageUtils";
import { findValidElement, getControls, getHashParams, isVisible, getHoverPreview } from "./utils/pageUtils";
import { CategoryPill } from "./render/CategoryPill";
import { AnimationUtils } from "./utils/animationUtils";
import { GenericUtils } from "./utils/genericUtils";
@@ -92,6 +92,8 @@ const playerButtons: Record<string, {button: HTMLButtonElement, image: HTMLImage
// Direct Links after the config is loaded
utils.wait(() => Config.config !== null, 1000, 1).then(() => videoIDChange(getYouTubeVideoID(document)));
// wait infinitely for hover preview
utils.wait(() => getHoverPreview(), 0, 500).then(() => refreshVideoAttachments())
addPageListeners();
addHotkeyListener();