mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Fixed keybind not working
This commit is contained in:
parent
db7ac02c7d
commit
4049d2d1ab
1 changed files with 3 additions and 3 deletions
|
@ -188,7 +188,7 @@ if (!SB.configListeners.includes(contentConfigUpdateListener)) {
|
|||
}
|
||||
|
||||
//check for hotkey pressed
|
||||
document.onkeydown = async function(e){
|
||||
document.onkeydown = function(e: KeyboardEvent){
|
||||
var key = e.key;
|
||||
|
||||
let video = document.getElementById("movie_player");
|
||||
|
@ -199,10 +199,10 @@ document.onkeydown = async function(e){
|
|||
|
||||
//is the video in focus, otherwise they could be typing a comment
|
||||
if (document.activeElement === video) {
|
||||
if(key == startSponsorKey.startSponsorKeybind){
|
||||
if(key == startSponsorKey){
|
||||
//semicolon
|
||||
startSponsorClicked();
|
||||
} else if (key == submitKey.submitKeybind) {
|
||||
} else if (key == submitKey) {
|
||||
//single quote
|
||||
submitSponsorTimes();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue