aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
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 3e821333..474365ae 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -105,11 +105,8 @@ async function apiTextParseMecab(text, optionsContext) {
return results;
}
-async function apiKanjiFind(text, optionsContext) {
- const options = await apiOptionsGet(optionsContext);
- const definitions = await utilBackend().translator.findKanji(text, options);
- definitions.splice(options.general.maxResults);
- return definitions;
+function apiKanjiFind(text, optionsContext) {
+ return utilBackend()._onApiKanjiFind({text, optionsContext});
}
async function apiDefinitionAdd(definition, mode, context, optionsContext) {