diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-08 18:52:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 18:52:23 -0400 |
commit | c1b16cebe7744b5d98b8e109bb3235676a79f474 (patch) | |
tree | b569740a044f68cae069a569d7be7cb0e4393ef6 /ext/fg | |
parent | 5af3c680e4b92509e95cf375eb34bddd24fd34f2 (diff) |
Refactor how TextScanner's public search() function is used (#787)
Diffstat (limited to 'ext/fg')
-rw-r--r-- | ext/fg/js/frontend.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index b9656882..517a9de0 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -129,7 +129,7 @@ class Frontend { } async setTextSource(textSource) { - await this._textScanner.search(textSource, 'script'); + await this._textScanner.search(textSource); } async getOptionsContext() { @@ -299,11 +299,7 @@ class Frontend { this._updateContentScale(); - const textSourceCurrent = this._textScanner.getCurrentTextSource(); - const causeCurrent = this._textScanner.causeCurrent; - if (textSourceCurrent !== null && causeCurrent !== null) { - await this._textScanner.search(textSourceCurrent, causeCurrent); - } + await this._textScanner.searchLast(); } async _updatePopup() { |