aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-26 16:52:45 -0400
committerGitHub <noreply@github.com>2020-07-26 16:52:45 -0400
commitfca00045978003056af6b1cf5665f466ef1b3f08 (patch)
treef8f33d9d77f38636f14ad5cf6b38bda3e10fe97a /ext/bg
parent208217198e9228699e7299f06d3701899d44d8bb (diff)
Don't assign mode as a search parameter (#692)
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/backend.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 19d285ef..ded343c7 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -814,10 +814,13 @@ class Backend {
const {mode='existingOrNewTab', query} = params || {};
const baseUrl = chrome.runtime.getURL('/bg/search.html');
- const queryParams = {mode};
+ const queryParams = {};
if (query && query.length > 0) { queryParams.query = query; }
const queryString = new URLSearchParams(queryParams).toString();
- const url = `${baseUrl}?${queryString}`;
+ let url = baseUrl;
+ if (queryString.length > 0) {
+ url += `?${queryString}`;
+ }
const isTabMatch = (url2) => {
if (url2 === null || !url2.startsWith(baseUrl)) { return false; }