Allow multiple options pages to be opened on middle click

This commit is contained in:
toasted-nutbread 2019-10-19 22:32:49 -04:00
parent d9ae34821c
commit ffb6ff9325

View File

@ -176,8 +176,14 @@ apiCommandExec.handlers = {
chrome.tabs.create({url: 'https://foosoft.net/projects/yomichan/'});
},
options: () => {
chrome.runtime.openOptionsPage();
options: (params) => {
if (!(params && params.newTab)) {
chrome.runtime.openOptionsPage();
} else {
const manifest = chrome.runtime.getManifest();
const url = chrome.extension.getURL(manifest.options_ui.page);
chrome.tabs.create({url});
}
},
toggle: async () => {