diff options
author | Michael C <[email protected]> | 2022-05-10 21:56:01 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-05-17 14:10:57 -0400 |
commit | 3da6a57e42211c41cd28ffcdd8194eceeb3ab74a (patch) | |
tree | 2a978addb73d92ed13bae57f0f2da7444aec83da | |
parent | 7ce9442153e10562fd67c1678159efbf8c0a6161 (diff) | |
download | SponsorBlock-3da6a57e42211c41cd28ffcdd8194eceeb3ab74a.tar.gz SponsorBlock-3da6a57e42211c41cd28ffcdd8194eceeb3ab74a.zip |
shorcut creating preview bar on invidious
-rw-r--r-- | src/content.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts index d969fc32..c3796cb9 100644 --- a/src/content.ts +++ b/src/content.ts @@ -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", |