aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/driver.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-25 15:59:33 -0700
committerAlex Yatskov <alex@foosoft.net>2017-03-25 15:59:33 -0700
commitb8d0788144974daab8d55c8de1af7515a291ba4f (patch)
tree32d778204049561b7f20c2e1a914ff6840340e86 /ext/fg/js/driver.js
parent90eaae1725511bbc039f84f684b7b080e0fa2d44 (diff)
wip
Diffstat (limited to 'ext/fg/js/driver.js')
-rw-r--r--ext/fg/js/driver.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index 5e17537e..7a56dd9c 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -46,14 +46,14 @@ window.driver = new class {
}
popupTimerClear() {
- if (this.popupTimer !== null) {
+ if (this.popupTimer) {
window.clearTimeout(this.popupTimer);
this.popupTimer = null;
}
}
onMouseOver(e) {
- if (e.target === this.popup.container && this.popuptimer !== null) {
+ if (e.target === this.popup.container && this.popupTimer) {
this.popupTimerClear();
}
}
@@ -106,14 +106,6 @@ window.driver = new class {
const handlers = {
popupClose: () => {
this.searchClear();
- },
-
- scanLeft: () => {
-
- },
-
- scanRight: () => {
-
}
};
@@ -147,11 +139,11 @@ window.driver = new class {
}
const textSource = docRangeFromPoint(point, this.options.scanning.imposter);
- if (textSource === null || !textSource.containsPoint(point)) {
+ if (!textSource || !textSource.containsPoint(point)) {
return;
}
- if (this.lastTextSource !== null && this.lastTextSource.equals(textSource)) {
+ if (this.lastTextSource && this.lastTextSource.equals(textSource)) {
return;
}
@@ -225,7 +217,7 @@ window.driver = new class {
docImposterDestroy();
this.popup.hide();
- if (this.options.scanning.selectText && this.lastTextSource !== null) {
+ if (this.options.scanning.selectText && this.lastTextSource) {
this.lastTextSource.deselect();
}