summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index afb182d4..bd652f3b 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -311,18 +311,10 @@ class Frontend {
async searchTerms(textSource) {
textSource.setEndOffset(this.options.scanning.length);
- const {text, strippedIndices} = textSource.text();
- let {definitions, length} = await apiTermsFind(text);
+ const {definitions, length} = await apiTermsFind(textSource.text());
if (definitions.length === 0) {
return false;
}
- for (let index of strippedIndices) {
- if (index < length) {
- length++;
- } else {
- break;
- }
- }
textSource.setEndOffset(length);
@@ -346,8 +338,7 @@ class Frontend {
async searchKanji(textSource) {
textSource.setEndOffset(1);
- const {text} = textSource.text();
- const definitions = await apiKanjiFind(text);
+ const definitions = await apiKanjiFind(textSource.text());
if (definitions.length === 0) {
return false;
}