diff options
author | Ajay Ramachandran <[email protected]> | 2021-02-03 18:28:50 -0500 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-02-03 18:28:50 -0500 |
commit | 54b4681fc3972317dc35b5e75aa99f35a90dd96c (patch) | |
tree | fdf6a0f307d2de5d5fced2f42cc07743abdc1501 | |
parent | 318d00a9c49b3390fa03a4c439b20914538daff2 (diff) | |
download | SponsorBlock-54b4681fc3972317dc35b5e75aa99f35a90dd96c.tar.gz SponsorBlock-54b4681fc3972317dc35b5e75aa99f35a90dd96c.zip |
Fix invidious support
Fixes https://github.com/ajayyy/SponsorBlock/issues/636
-rw-r--r-- | src/content.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content.ts b/src/content.ts index fcfe832f..e6e87704 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1528,7 +1528,8 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string { } 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)) { videoRoot.addEventListener("keydown", hotkeyListener); |