From a0d5d9a8219e52a826d5d8616dacbe1f2aee7a65 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Wed, 26 Feb 2020 01:54:40 +0200 Subject: fix opening options in new tab --- ext/bg/js/backend.js | 5 +++-- 1 file 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}); -- cgit v1.2.3