rename sameTab --> existingOrNewTab
This commit is contained in:
parent
722a2a4bce
commit
9fbd47e4ea
@ -597,7 +597,7 @@ class Backend {
|
|||||||
// Command handlers
|
// Command handlers
|
||||||
|
|
||||||
async _onCommandSearch(params) {
|
async _onCommandSearch(params) {
|
||||||
const {mode, query} = params || {mode: 'sameTab'};
|
const {mode, query} = params || {mode: 'existingOrNewTab'};
|
||||||
|
|
||||||
const options = await this.getOptions(this.optionsContext);
|
const options = await this.getOptions(this.optionsContext);
|
||||||
const {popupWidth, popupHeight} = options.general;
|
const {popupWidth, popupHeight} = options.general;
|
||||||
@ -609,7 +609,7 @@ class Backend {
|
|||||||
const url = `${baseUrl}?${queryString}`;
|
const url = `${baseUrl}?${queryString}`;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'sameTab':
|
case 'existingOrNewTab':
|
||||||
try {
|
try {
|
||||||
const tab = await Backend._findTab(1000, (url2) => (
|
const tab = await Backend._findTab(1000, (url2) => (
|
||||||
url2 !== null &&
|
url2 !== null &&
|
||||||
|
@ -30,7 +30,7 @@ function setupButtonEvents(selector, command, url) {
|
|||||||
for (const node of nodes) {
|
for (const node of nodes) {
|
||||||
node.addEventListener('click', (e) => {
|
node.addEventListener('click', (e) => {
|
||||||
if (e.button !== 0) { return; }
|
if (e.button !== 0) { return; }
|
||||||
apiCommandExec(command, {mode: e.ctrlKey ? 'newTab' : 'sameTab'});
|
apiCommandExec(command, {mode: e.ctrlKey ? 'newTab' : 'existingOrNewTab'});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}, false);
|
}, false);
|
||||||
node.addEventListener('auxclick', (e) => {
|
node.addEventListener('auxclick', (e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user