summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js28
1 files changed, 23 insertions, 5 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 418707ca..927c2c2c 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -218,11 +218,29 @@ class Display extends EventDispatcher {
}
async updateOptions() {
- this._options = await api.optionsGet(this.getOptionsContext());
- this._updateDocumentOptions(this._options);
- this._updateTheme(this._options.general.popupTheme);
- this.setCustomCss(this._options.general.customPopupCss);
- this._queryParser.setOptions(this._options);
+ const options = await api.optionsGet(this.getOptionsContext());
+ const scanning = options.scanning;
+ this._options = options;
+
+ this._updateDocumentOptions(options);
+ this._updateTheme(options.general.popupTheme);
+ this.setCustomCss(options.general.customPopupCss);
+
+ this._queryParser.setOptions({
+ selectedParser: options.parsing.selectedParser,
+ scanLength: scanning.length,
+ sentenceExtent: options.anki.sentenceExt,
+ layoutAwareScan: scanning.layoutAwareScan,
+ termSpacing: options.parsing.termSpacing,
+ scanning: {
+ deepContentScan: scanning.deepDomScan,
+ selectText: scanning.selectText,
+ modifier: scanning.modifier,
+ useMiddleMouse: scanning.middleMouse,
+ delay: scanning.delay,
+ touchInputEnabled: scanning.touchInputEnabled
+ }
+ });
}
addMultipleEventListeners(selector, type, listener, options) {