shorcut creating preview bar on invidious

This commit is contained in:
Michael C
2022-05-10 21:56:01 -04:00
committed by Ajay
parent 7ce9442153
commit 3da6a57e42

View File

@@ -391,6 +391,16 @@ function handleMobileControlsMutations(): void {
function createPreviewBar(): void {
if (previewBar !== null) return;
if (onInvidious) { // shortut invidious
// skip isVisible check for invidious
const el = document.querySelector<HTMLElement>(".vjs-progress-holder");
if (el) {
previewBar = new PreviewBar(el, onMobileYouTube, onInvidious);
updatePreviewBar();
return;
}
}
const progressElementSelectors = [
// For mobile YouTube
".progress-bar-background",