diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-02 16:08:19 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-09 21:51:33 +0200 |
commit | c16c38638b4ce39f64add0d6e430a21e44d8ec01 (patch) | |
tree | 38bced13ba7e6fba514b8a63228e4f74cb25db30 /ext/bg/js/backend.js | |
parent | 8d56d6ffcb0f02e1edaf4193e182e95bfe7d22c5 (diff) |
hide search input in native popups
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index a9f2385b..bdb8a76a 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -603,8 +603,10 @@ class Backend { const {popupWidth, popupHeight} = options.general; const baseUrl = chrome.runtime.getURL('/bg/search.html'); - const queryString = (query && query.length > 0) ? `?query=${encodeURIComponent(query)}` : ''; - const url = baseUrl + queryString; + const queryParams = {mode}; + if (query && query.length > 0) { queryParams.query = query; } + const queryString = new URLSearchParams(queryParams).toString(); + const url = `${baseUrl}?${queryString}`; switch (mode) { case 'sameTab': |