summaryrefslogtreecommitdiff
path: root/ext/mixed/js/text-scanner.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-03-13 23:23:08 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-03-21 22:13:07 +0200
commit962c2a381f3dace4d97fd0625504ec841e378354 (patch)
tree92ea4bee6a3a70f61965e98ca143b2a18cfcdad3 /ext/mixed/js/text-scanner.js
parent647769f2baae338f201690f21c4bf8983bcb10b0 (diff)
apply all options on profile change
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r--ext/mixed/js/text-scanner.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js
index a08e09fb..b8156c01 100644
--- a/ext/mixed/js/text-scanner.js
+++ b/ext/mixed/js/text-scanner.js
@@ -23,13 +23,15 @@
*/
class TextScanner {
- constructor(node, ignoreNodes, ignoreElements, ignorePoints) {
+ constructor(node, ignoreElements, ignorePoints) {
this.node = node;
- this.ignoreNodes = (Array.isArray(ignoreNodes) && ignoreNodes.length > 0 ? ignoreNodes.join(',') : null);
this.ignoreElements = ignoreElements;
this.ignorePoints = ignorePoints;
+ this.ignoreNodes = null;
+
this.scanTimerPromise = null;
+ this.causeCurrent = null;
this.textSourceCurrent = null;
this.pendingLookup = false;
this.options = null;
@@ -298,6 +300,7 @@ class TextScanner {
this.pendingLookup = true;
const result = await this.onSearchSource(textSource, cause);
if (result !== null) {
+ this.causeCurrent = cause;
this.textSourceCurrent = textSource;
if (this.options.scanning.selectText) {
textSource.select();