Merge pull request #2492 from dannycolin/bug-2457-sort-shortcut

Fix 2457 - add shortcut for sorting tabs by container
This commit is contained in:
Danny Colin 2023-06-08 11:55:27 -04:00 committed by GitHub
commit b29ba2094e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

@ -1 +1 @@
Subproject commit 417e6294ed767914b617a5e56ccbe67482df181c Subproject commit 1b944a2cbd8577c8ca928729ff1439dd30ce8269

View file

@ -15,6 +15,11 @@ const backgroundLogic = {
unhideQueue: [], unhideQueue: [],
init() { init() {
browser.commands.onCommand.addListener(function (command) { browser.commands.onCommand.addListener(function (command) {
if (command === "sort_tabs") {
backgroundLogic.sortTabs();
return;
}
for (let i=0; i < backgroundLogic.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) { for (let i=0; i < backgroundLogic.NUMBER_OF_KEYBOARD_SHORTCUTS; i++) {
const key = "open_container_" + i; const key = "open_container_" + i;
const cookieStoreId = identityState.keyboardShortcut[key]; const cookieStoreId = identityState.keyboardShortcut[key];

View file

@ -43,6 +43,13 @@
}, },
"description": "Open containers panel" "description": "Open containers panel"
}, },
"sort_tabs": {
"suggested_key": {
"default": "Ctrl+Comma",
"mac": "MacCtrl+Comma"
},
"description": "Sort tabs by container"
},
"open_container_0": { "open_container_0": {
"suggested_key": { "suggested_key": {
"default": "Ctrl+Shift+1" "default": "Ctrl+Shift+1"