diff options
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r-- | ext/bg/js/settings/main.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index b29744ac..f775cd57 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -22,6 +22,7 @@ * ClipboardPopupsController * DictionaryController * DictionaryImportController + * DocumentUtil * GenericSettingController * PopupPreviewController * ProfileController @@ -43,12 +44,12 @@ async function settingsPopulateModifierKeys() { const scanModifierKeySelect = document.querySelector('#scan-modifier-key'); scanModifierKeySelect.textContent = ''; - const environment = await api.getEnvironmentInfo(); + const {platform: {os}} = await api.getEnvironmentInfo(); const modifierKeys = [ - {value: 'none', name: 'None'}, - ...environment.modifiers.keys + ['none', 'None'], + DocumentUtil.getModifierKeys(os) ]; - for (const {value, name} of modifierKeys) { + for (const [value, name] of modifierKeys) { const option = document.createElement('option'); option.value = value; option.textContent = name; |