Cleaner visual for adding and removing of new hotkeys

This commit is contained in:
ortiza5
2021-03-15 01:51:10 -06:00
parent 1e4b8f3870
commit 22b9b328a5
2 changed files with 8 additions and 5 deletions

View File

@@ -70,8 +70,8 @@ function updateHotkey(element, newVal, index) {
// remove the hotkey at the index provided
newSettings.hotkeys.codes[parentSection.id].splice(index, 1);
} else {
// add the new hotkey to the end of the stored hotkeys
newSettings.hotkeys.codes[parentSection.id].push(newVal);
// add the new hotkey to the beginning of the stored hotkeys
newSettings.hotkeys.codes[parentSection.id].unshift(newVal);
}
chrome.storage.local.set({ "extension-settings": newSettings }, function () {