summaryrefslogtreecommitdiff
path: root/ext/bg/js/context.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/context.js')
-rw-r--r--ext/bg/js/context.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/context.js b/ext/bg/js/context.js
index 834174bf..bec964fb 100644
--- a/ext/bg/js/context.js
+++ b/ext/bg/js/context.js
@@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+/*global apiCommandExec, apiGetEnvironmentInfo, apiOptionsGet*/
function showExtensionInfo() {
const node = document.getElementById('extension-info');
@@ -30,12 +31,12 @@ function setupButtonEvents(selector, command, url) {
for (const node of nodes) {
node.addEventListener('click', (e) => {
if (e.button !== 0) { return; }
- apiCommandExec(command, {newTab: e.ctrlKey});
+ apiCommandExec(command, {mode: e.ctrlKey ? 'newTab' : 'existingOrNewTab'});
e.preventDefault();
}, false);
node.addEventListener('auxclick', (e) => {
if (e.button !== 1) { return; }
- apiCommandExec(command, {newTab: true});
+ apiCommandExec(command, {mode: 'newTab'});
e.preventDefault();
}, false);