diff options
author | Ajay Ramachandran <[email protected]> | 2020-07-05 00:09:18 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2020-07-05 00:09:18 -0400 |
commit | 87f3cf3881676c7e4bfabd9ffe4cd635353603a3 (patch) | |
tree | d1716d83e84e88523f609ab5853757cbeda35207 | |
parent | 0b9df8a45cd986df0796be6773e809b5d9394898 (diff) | |
download | SponsorBlock-87f3cf3881676c7e4bfabd9ffe4cd635353603a3.tar.gz SponsorBlock-87f3cf3881676c7e4bfabd9ffe4cd635353603a3.zip |
Fixed invidious preview bar
-rw-r--r-- | src/content.ts | 2 | ||||
-rw-r--r-- | src/js-components/previewBar.ts | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/content.ts b/src/content.ts index 7acf45c6..c443077b 100644 --- a/src/content.ts +++ b/src/content.ts @@ -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(); diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index e9b52002..f91e9a58 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -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"); |