Fixed invidious preview bar

This commit is contained in:
Ajay Ramachandran
2020-07-05 00:09:18 -04:00
parent 0b9df8a45c
commit 87f3cf3881
2 changed files with 5 additions and 3 deletions

View File

@@ -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();

View File

@@ -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");