rename sameTab --> existingOrNewTab

This commit is contained in:
siikamiika 2020-02-09 21:06:59 +02:00
parent 722a2a4bce
commit 9fbd47e4ea
2 changed files with 3 additions and 3 deletions

View File

@ -597,7 +597,7 @@ class Backend {
// Command handlers
async _onCommandSearch(params) {
const {mode, query} = params || {mode: 'sameTab'};
const {mode, query} = params || {mode: 'existingOrNewTab'};
const options = await this.getOptions(this.optionsContext);
const {popupWidth, popupHeight} = options.general;
@ -609,7 +609,7 @@ class Backend {
const url = `${baseUrl}?${queryString}`;
switch (mode) {
case 'sameTab':
case 'existingOrNewTab':
try {
const tab = await Backend._findTab(1000, (url2) => (
url2 !== null &&

View File

@ -30,7 +30,7 @@ function setupButtonEvents(selector, command, url) {
for (const node of nodes) {
node.addEventListener('click', (e) => {
if (e.button !== 0) { return; }
apiCommandExec(command, {mode: e.ctrlKey ? 'newTab' : 'sameTab'});
apiCommandExec(command, {mode: e.ctrlKey ? 'newTab' : 'existingOrNewTab'});
e.preventDefault();
}, false);
node.addEventListener('auxclick', (e) => {