aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-09 13:19:42 -0400
committerGitHub <noreply@github.com>2020-08-09 13:19:42 -0400
commite87cc5c37d6ae2f845af7bd28720cb47372589bc (patch)
tree6dcee5e3975cb4deab514eaca7fa24aaf9a6250e /ext/fg/js
parentb3eb2cb1ef9fd28ea2dadb9eda8568a3b6958e9c (diff)
Query parser text scanner options refactor (#717)
* Add _setSelectedParser helper * Update TextScanner internal options representation * Update QueryParser internal options representation
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/frontend.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 685dbd28..1214e74b 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -233,11 +233,20 @@ class Frontend {
async _updateOptionsInternal() {
const optionsContext = await this.getOptionsContext();
- this._options = await api.optionsGet(optionsContext);
+ const options = await api.optionsGet(optionsContext);
+ const scanningOptions = options.scanning;
+ this._options = options;
await this._updatePopup();
- this._textScanner.setOptions(this._options);
+ this._textScanner.setOptions({
+ deepContentScan: scanningOptions.deepDomScan,
+ selectText: scanningOptions.selectText,
+ modifier: scanningOptions.modifier,
+ useMiddleMouse: scanningOptions.middleMouse,
+ delay: scanningOptions.delay,
+ touchInputEnabled: scanningOptions.touchInputEnabled
+ });
this._updateTextScannerEnabled();
const ignoreNodes = ['.scan-disable', '.scan-disable *'];