testing keyboard shortcuts

This commit is contained in:
Kendall Werts
2020-02-13 23:56:28 -06:00
parent 97d4c46a4e
commit fbba6beee2
2 changed files with 23 additions and 1 deletions
+11 -1
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"});
}
});