fix opening options in new tab

This commit is contained in:
siikamiika 2020-02-26 01:54:40 +02:00
parent 706c3edcff
commit a0d5d9a821

View File

@ -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});