testing keyboard shortcuts

This commit is contained in:
Kendall Werts 2020-02-13 23:56:28 -06:00
parent f600c24879
commit dd6f084ad1
2 changed files with 23 additions and 1 deletions

View file

@ -331,4 +331,14 @@ const backgroundLogic = {
cookieStoreId(userContextId) {
return `firefox-container-${userContextId}`;
}
};
};
browser.commands.onCommand.addListener(function (command) {
if (command === "open_container_2") {
browser.tabs.create({cookieStoreId: "firefox-container-2"});
}
if (command === "open_container_1") {
console.log("Toggling the feature!");
browser.tabs.create({cookieStoreId: "firefox-container-1"});
}
});

View file

@ -39,6 +39,18 @@
"mac": "MacCtrl+Period"
},
"description": "Open containers panel"
},
"open_container_1": {
"suggested_key": {
"default": "Ctrl+Shift+1"
},
"description": "Container Shortcut 1"
},
"open_container_2": {
"suggested_key": {
"default": "Ctrl+Shift+2"
},
"description": "Container Shortcut 2"
}
},
"browser_action": {