Remove keybind restriction.

Closes https://github.com/ajayyy/SponsorBlock/issues/379
This commit is contained in:
Ajay Ramachandran 2020-07-03 19:07:05 -04:00
parent 1265eeb941
commit 037bd511b0
2 changed files with 0 additions and 12 deletions

View file

@ -466,9 +466,6 @@
"theKey": {
"message": "The key"
},
"keyAlreadyUsedByYouTube": {
"message": "is already used by youtube. Please select another key."
},
"keyAlreadyUsed": {
"message": "is bound to another action. Please select another key."
},

View file

@ -362,15 +362,6 @@ function keybindKeyPressed(element: HTMLElement, e: KeyboardEvent) {
let button: HTMLElement = element.querySelector(".trigger-button");
let option = element.getAttribute("sync-option");
// Don't allow keys which are already listened for by youtube
let restrictedKeys = "1234567890,.jklftcibmJKLFTCIBMNP/<> -+";
if (restrictedKeys.indexOf(key) !== -1 ) {
closeKeybindOption(element, button);
alert(chrome.i18n.getMessage("theKey") + " " + key + " " + chrome.i18n.getMessage("keyAlreadyUsedByYouTube"));
return;
}
// Make sure keybind isn't used by the other listener
// TODO: If other keybindings are going to be added, we need a better way to find the other keys used.
let otherKeybind = (option === "startSponsorKeybind") ? Config.config['submitKeybind'] : Config.config['startSponsorKeybind'];