summaryrefslogtreecommitdiff
path: root/ext/bg/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r--ext/bg/js/search.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index abd40640..aa56d1a6 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -203,11 +203,18 @@ class DisplaySearch extends Display {
async onSearchQueryUpdated(query, animate) {
try {
+ const details = {};
+ const match = /[\*\uff0a]+$/.exec(query);
+ if (match !== null) {
+ details.wildcard = true;
+ query = query.substr(0, query.length - match[0].length);
+ }
+
const valid = (query.length > 0);
this.setIntroVisible(!valid, animate);
this.updateSearchButton();
if (valid) {
- const {definitions} = await apiTermsFind(query, {}, this.optionsContext);
+ const {definitions} = await apiTermsFind(query, details, this.optionsContext);
this.setContentTerms(definitions, {
focus: false,
sentence: null,