aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2017-09-29 05:41:29 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2017-09-29 05:41:29 +0300
commitb24c70523479c16eca848f5aafaa887549689ac6 (patch)
tree164cc016a3a9012c1d92469f9ee06a869d72fbea /ext/bg/js/api.js
parent9106b59af628df26f86474fc77abb88c7d9bf9c5 (diff)
basic structure for feature-merge-similar-results
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 9f65bb07..01322357 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -29,9 +29,9 @@ async function apiTermsFind(text) {
const options = utilBackend().options;
const translator = utilBackend().translator;
- const searcher = options.general.groupResults ?
- translator.findTermsGrouped.bind(translator) :
- translator.findTermsSplit.bind(translator);
+ const searcher = (options.general.resultOutputMode === 'merge') && translator.findTermsMerged.bind(translator)
+ || (options.general.resultOutputMode === 'split') && translator.findTermsSplit.bind(translator)
+ || (options.general.resultOutputMode === 'group') && translator.findTermsGrouped.bind(translator);
const {definitions, length} = await searcher(
text,