From 44206f34003807d21c92110d7bff1a10fcab033a Mon Sep 17 00:00:00 2001 From: Kendall Werts Date: Thu, 13 Feb 2020 23:56:28 -0600 Subject: [PATCH] testing keyboard shortcuts --- src/js/background/backgroundLogic.js | 12 +++++++++++- src/manifest.json | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index d68e51e..7aba5f6 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -331,4 +331,14 @@ const backgroundLogic = { cookieStoreId(userContextId) { return `firefox-container-${userContextId}`; } -}; \ No newline at end of file +}; + +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"}); + } +}); \ No newline at end of file diff --git a/src/manifest.json b/src/manifest.json index e88af90..938d8b0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -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": {