aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-02-26 01:54:40 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-02-26 01:54:40 +0200
commita0d5d9a8219e52a826d5d8616dacbe1f2aee7a65 (patch)
tree01cc664437eed094ca8c3ad81b8cf25137f7af6c
parent706c3edcffb0078d71fd5b58775f16cf5fc1205b (diff)
fix opening options in new tab
-rw-r--r--ext/bg/js/backend.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index e3bf7bda..3051a873 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -693,9 +693,10 @@ class Backend {
}
_onCommandOptions(params) {
- if (!(params && params.newTab)) {
+ const {mode='existingOrNewTab'} = params || {};
+ if (mode === 'existingOrNewTab') {
chrome.runtime.openOptionsPage();
- } else {
+ } else if (mode === 'newTab') {
const manifest = chrome.runtime.getManifest();
const url = chrome.runtime.getURL(manifest.options_ui.page);
chrome.tabs.create({url});