aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-17 01:31:25 +0300
committerGitHub <noreply@github.com>2020-04-17 01:31:25 +0300
commite6053eefa594524c7adcec4986a5a2c499adf192 (patch)
tree5a42ad3163455eda4306fbb5964f8b7fec20bf82 /ext/mixed
parentbf971be15bf8787f992f03bb5943e3ee32c1583a (diff)
parentb6f7f8c02637cef9cadd4ab2b9f253c42903aee6 (diff)
Merge pull request #439 from siikamiika/popup-live-toggle
Popup live toggle
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/text-scanner.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index e6b9a2e6..0cd12cd7 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -46,7 +46,7 @@ class TextScanner {
}
onMouseOver(e) {
- if (this.ignoreElements.includes(e.target)) {
+ if (this.ignoreElements().includes(e.target)) {
this.scanTimerClear();
}
}
@@ -224,8 +224,8 @@ class TextScanner {
}
}
- setEnabled(enabled) {
- if (enabled) {
+ setEnabled(enabled, canEnable) {
+ if (enabled && canEnable) {
if (!this.enabled) {
this.hookEvents();
this.enabled = true;
@@ -271,9 +271,9 @@ class TextScanner {
];
}
- setOptions(options) {
+ setOptions(options, canEnable=true) {
this.options = options;
- this.setEnabled(this.options.general.enable);
+ this.setEnabled(this.options.general.enable, canEnable);
}
async searchAt(x, y, cause) {