diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-07-26 16:52:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-26 16:52:45 -0400 |
commit | fca00045978003056af6b1cf5665f466ef1b3f08 (patch) | |
tree | f8f33d9d77f38636f14ad5cf6b38bda3e10fe97a /ext | |
parent | 208217198e9228699e7299f06d3701899d44d8bb (diff) |
Don't assign mode as a search parameter (#692)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bg/js/backend.js | 7 |
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; } |