From 35c6ed81b5e6260aa1555e28788b9a3c7ba345ff Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 28 Aug 2019 18:11:29 -0400 Subject: [PATCH] Updated hotkey handling. --- content.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content.js b/content.js index d6a8bf2c..8758d0f9 100644 --- a/content.js +++ b/content.js @@ -189,16 +189,16 @@ function messageListener(request, sender, sendResponse) { //check for hotkey pressed document.onkeydown = function(e){ e = e || window.event; - var key = e.which || e.keyCode; + var key = e.key; let video = document.getElementById("movie_player"); //is the video in focus, otherwise they could be typing a comment if (document.activeElement === video) { - if(key == 186){ + if(key == ';'){ //semicolon startSponsorClicked(); - } else if (key == 222) { + } else if (key == "'") { //single quote submitSponsorTimes(); }