mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 12:07:11 +03:00
Fix invidious support
Fixes https://github.com/ajayyy/SponsorBlock/issues/636
This commit is contained in:
@@ -1528,7 +1528,8 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addHotkeyListener(): boolean {
|
function addHotkeyListener(): boolean {
|
||||||
const videoRoot = document.getElementById("movie_player") as HTMLDivElement;
|
let videoRoot = document.getElementById("movie_player") as HTMLDivElement;
|
||||||
|
if (onInvidious) videoRoot = document.getElementById("player-container") as HTMLDivElement;
|
||||||
|
|
||||||
if (!videoRootsWithEventListeners.includes(videoRoot)) {
|
if (!videoRootsWithEventListeners.includes(videoRoot)) {
|
||||||
videoRoot.addEventListener("keydown", hotkeyListener);
|
videoRoot.addEventListener("keydown", hotkeyListener);
|
||||||
|
|||||||
Reference in New Issue
Block a user