summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 6ae3b06d..49c8a91c 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -322,11 +322,13 @@ class Frontend {
});
this._updateTextScannerEnabled();
- const ignoreNodes = ['.scan-disable', '.scan-disable *'];
- if (!this._options.scanning.enableOnPopupExpressions) {
- ignoreNodes.push('.source-text', '.source-text *');
+ if (this._pageType !== 'web') {
+ const excludeSelectors = ['.scan-disable', '.scan-disable *'];
+ if (!scanningOptions.enableOnPopupExpressions) {
+ excludeSelectors.push('.source-text', '.source-text *');
+ }
+ this._textScanner.excludeSelector = excludeSelectors.join(',');
}
- this._textScanner.ignoreNodes = ignoreNodes.join(',');
this._updateContentScale();
@@ -527,7 +529,7 @@ class Frontend {
}
_updateTextScannerEnabled() {
- const enabled = (this._options.general.enable && !this._disabledOverride);
+ const enabled = (this._options !== null && this._options.general.enable && !this._disabledOverride);
this._textScanner.setEnabled(enabled);
}