aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-09 21:15:37 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-13 23:11:56 -0500
commit73ce2fe3d3572faa194735052b1448f6a46fa969 (patch)
treeefa5a351207d984ca001156fb3797fb2c4219c51 /ext/bg/js/api.js
parent5cceba15e2db85f77dd80b24f1ad25b18775df94 (diff)
Move apiTermsFind implementation into Backend
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 474365ae..d361bde7 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -33,11 +33,8 @@ function apiOptionsSave(source) {
return utilBackend()._onApiOptionsSave({source});
}
-async function apiTermsFind(text, details, optionsContext) {
- const options = await apiOptionsGet(optionsContext);
- const [definitions, length] = await utilBackend().translator.findTerms(text, details, options);
- definitions.splice(options.general.maxResults);
- return {length, definitions};
+function apiTermsFind(text, details, optionsContext) {
+ return utilBackend()._onApiTermsFind({text, details, optionsContext});
}
async function apiTextParse(text, optionsContext) {