From 9fbd47e4eaeee2f1121cdeae08dbc5439b247498 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sun, 9 Feb 2020 21:06:59 +0200 Subject: [PATCH] rename sameTab --> existingOrNewTab --- ext/bg/js/backend.js | 4 ++-- ext/bg/js/context.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index bdb8a76a..f94463aa 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -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 && diff --git a/ext/bg/js/context.js b/ext/bg/js/context.js index a0e5adc9..37adb6b7 100644 --- a/ext/bg/js/context.js +++ b/ext/bg/js/context.js @@ -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) => {