mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Fixed invidious preview bar
This commit is contained in:
@@ -418,7 +418,7 @@ function createPreviewBar(): void {
|
||||
const el = document.querySelectorAll(selector);
|
||||
|
||||
if (el && el.length && el[0]) {
|
||||
previewBar = new PreviewBar(el[0], onMobileYouTube);
|
||||
previewBar = new PreviewBar(el[0], onMobileYouTube, onInvidious);
|
||||
|
||||
updatePreviewBar();
|
||||
|
||||
|
||||
@@ -13,16 +13,18 @@ class PreviewBar {
|
||||
container: HTMLUListElement;
|
||||
parent: any;
|
||||
onMobileYouTube: boolean;
|
||||
onInvidious: boolean;
|
||||
|
||||
timestamps: number[][];
|
||||
types: string;
|
||||
|
||||
constructor(parent, onMobileYouTube) {
|
||||
constructor(parent, onMobileYouTube, onInvidious) {
|
||||
this.container = document.createElement('ul');
|
||||
this.container.id = 'previewbar';
|
||||
this.parent = parent;
|
||||
|
||||
this.onMobileYouTube = onMobileYouTube;
|
||||
this.onInvidious = onInvidious;
|
||||
|
||||
this.updatePosition(parent);
|
||||
|
||||
@@ -30,7 +32,7 @@ class PreviewBar {
|
||||
}
|
||||
|
||||
setupHoverText() {
|
||||
if (this.onMobileYouTube) return;
|
||||
if (this.onMobileYouTube || this.onInvidious) return;
|
||||
|
||||
let seekBar = document.querySelector(".ytp-progress-bar-container");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user