aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-08-15 15:28:30 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2019-08-15 15:28:30 +0300
commit0a9b673e27de04c499e06680d36e804a6a43f673 (patch)
treec4da0948583d010c628375572c02ae21c0183abe /ext/fg/js/frontend.js
parent658e5ddff13f4ec392dc110004635e22d468525a (diff)
reimplement ignored chars inside source.js only
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;
}