diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-07-18 20:30:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 20:30:10 -0400 |
commit | 27e05f800132a1d3a306f511c53ef03c4ddb6c49 (patch) | |
tree | bc9130cf9d22ca9d045fd9f8afcda9fbfbeb8cf3 /ext/bg/js/search.js | |
parent | d7f78c23b50218eaa52ab4570a1e2297c52c287e (diff) |
Reusable backend popup window (#673)
* Update _updateSearchQuery to return the promise
* Update how the clipboard search popup is opened
* Create an API function to open the search popup
* Skip animation on popup creation
* Add API function
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r-- | ext/bg/js/search.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 52fc19f8..b046806e 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -216,12 +216,12 @@ class DisplaySearch extends Display { this._clipboardMonitor.setPreviousText(window.getSelection().toString().trim()); } - _onExternalSearchUpdate({text}) { + _onExternalSearchUpdate({text, animate=true}) { this._setQuery(text); const url = new URL(window.location.href); url.searchParams.set('query', text); window.history.pushState(null, '', url.toString()); - this._onSearchQueryUpdated(this._query.value, true); + this._onSearchQueryUpdated(this._query.value, animate); } async _onSearchQueryUpdated(query, animate) { |