summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-02-10 21:11:34 -0800
committerAlex Yatskov <alex@foosoft.net>2017-02-10 21:11:34 -0800
commit7398e74d71a91dfc1397c28f8dc5df4205d96249 (patch)
tree22ce0903cd03cda460924d3b79d3cc91c75064fe /ext/fg/js
parentecb007d052f241f550fd1579e314e3716bae34bb (diff)
delete dead code
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/driver.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index c84805d7..421c3591 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -75,7 +75,7 @@ class Driver {
return;
}
- const searcher = () => this.searchAt(this.lastMousePos, false);
+ const searcher = () => this.searchAt(this.lastMousePos);
if (!this.popup.isVisible() || e.shiftKey || e.which === 2 /* mmb */) {
searcher();
} else {
@@ -98,17 +98,13 @@ class Driver {
callback();
}
- searchAt(point, hideNotFound) {
+ searchAt(point) {
if (this.pendingLookup) {
return;
}
const textSource = textSourceFromPoint(point, this.options.scanning.imposter);
if (textSource === null || !textSource.containsPoint(point)) {
- if (hideNotFound) {
- this.searchClear();
- }
-
return;
}
@@ -119,11 +115,7 @@ class Driver {
this.pendingLookup = true;
this.searchTerms(textSource).then(found => {
if (!found) {
- return this.searchKanji(textSource).then(found => {
- if (!found && hideNotFound) {
- this.searchClear();
- }
- });
+ return this.searchKanji(textSource);
}
}).catch(error => {
this.handleError(error, textSource);