From ec1d707237e384f7b65a7cec65fb14ce58b1ce3a Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 21 Dec 2020 20:41:56 +0200 Subject: [PATCH] Small fixes for 1.7.4 --- keepassxc-browser/content/keepassxc-browser.js | 2 +- keepassxc-browser/options/shortcuts.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index f0c26c5..19f4733 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -762,7 +762,7 @@ kpxc.fillInFromActiveElement = async function(passOnly = false) { if (kpxc.credentials.length > 1) { // More than one credential -> show autocomplete list kpxcAutocomplete.showList(field); - return + return; } else { // Just one credential -> fill the first combination found kpxc.fillInCredentials(combination, kpxc.credentials[0].login, kpxc.credentials[0].uuid, passOnly); diff --git a/keepassxc-browser/options/shortcuts.js b/keepassxc-browser/options/shortcuts.js index 6fa533c..a99b2d0 100644 --- a/keepassxc-browser/options/shortcuts.js +++ b/keepassxc-browser/options/shortcuts.js @@ -16,7 +16,7 @@ const keyOptions = [ // From chrome://mozapps/content/extensions/shortcuts.js const validKeys = new Set([ 'Home', 'End', 'PageUp', 'PageDown', 'Insert', 'Delete', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12' , + 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'MediaNextTrack', 'MediaPlayPause', 'MediaPrevTrack', 'MediaStop', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Up', 'Down', 'Left', 'Right', 'Comma', 'Period', 'Space' @@ -45,7 +45,7 @@ function remapKey(string) { // Modified from chrome://mozapps/content/extensions/shortcuts.js function getStringForEvent(event) { - for (let option of keyOptions) { + for (const option of keyOptions) { const value = option(event); if (validKeys.has(value)) { return value; @@ -75,15 +75,15 @@ function getShortcutForEvent(e) { } return Object.entries(modifierMap) - .filter(([key, isDown]) => isDown) - .map(([key]) => key) + .filter(([ key, isDown ]) => isDown) + .map(([ key ]) => key) .concat(getStringForEvent(e)) .join('+'); } // Modified from chrome://mozapps/content/extensions/shortcuts.js function shortCutChanged(e) { - let input = e.target; + const input = e.target; if (e.key === 'Escape') { input.blur();