summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-22 14:50:21 -0500
committerGitHub <noreply@github.com>2020-02-22 14:50:21 -0500
commitf8f03f3af0ab031cc58bf5ad3f782c8d45137430 (patch)
tree3116b3a9429077d77f16d374835ab768d8b0d9d4 /ext/bg/js/backend.js
parentf3c4b0e1e14cbdfb86c692e89144c762801b2339 (diff)
parent418e7f9968ba8a6e302ec1e1b6d7dafe4b85fd97 (diff)
Merge pull request #362 from toasted-nutbread/more-type-refactoring
More type refactoring
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index a4d085e0..16dffc85 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -319,7 +319,8 @@ class Backend {
async _onApiTermsFind({text, details, optionsContext}) {
const options = await this.getOptions(optionsContext);
- const [definitions, length] = await this.translator.findTerms(text, details, options);
+ const mode = options.general.resultOutputMode;
+ const [definitions, length] = await this.translator.findTerms(mode, text, details, options);
definitions.splice(options.general.maxResults);
return {length, definitions};
}
@@ -329,9 +330,9 @@ class Backend {
const results = [];
while (text.length > 0) {
const term = [];
- const [definitions, sourceLength] = await this.translator.findTermsInternal(
+ const [definitions, sourceLength] = await this.translator.findTerms(
+ 'simple',
text.substring(0, options.scanning.length),
- dictEnabledSet(options),
{},
options
);