summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-09 16:59:03 -0400
committerGitHub <noreply@github.com>2020-09-09 16:59:03 -0400
commit0d00f7e1cf8a0fa1e2b1aa2732bceaae39f4e23c (patch)
tree92b0a2e72ef2cecb31e8cc70da354ee43b87e2b4 /ext/fg/js
parentacb7ad32f39c40b879400c9daa4bc8cd25585ba7 (diff)
Scanning input generalization (#789)
* Add inputs to options.scanning * Update CSS for mouse buttons * Update list counters * Set up HTML/CSS * Add input controller * Use new inputs * Include mouse buttons * Update how button inputs are detected * Add index/empty fields to the input details object * Update none check for scanning modifier * Remove old settings * Remove unused global
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/frontend.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 3ddf0d25..8189b8ad 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -254,12 +254,12 @@ class Frontend {
await this.updateOptions();
}
- _onSearched({type, definitions, sentence, input: {cause}, textSource, optionsContext, error}) {
+ _onSearched({type, definitions, sentence, input: {cause, empty}, textSource, optionsContext, error}) {
const scanningOptions = this._options.scanning;
if (error !== null) {
if (yomichan.isExtensionUnloaded) {
- if (textSource !== null && scanningOptions.modifier !== 'none') {
+ if (textSource !== null && !empty) {
this._showExtensionUnloaded(textSource);
}
} else {
@@ -321,10 +321,9 @@ class Frontend {
await this._updatePopup();
this._textScanner.setOptions({
+ inputs: scanningOptions.inputs,
deepContentScan: scanningOptions.deepDomScan,
selectText: scanningOptions.selectText,
- modifier: scanningOptions.modifier,
- useMiddleMouse: scanningOptions.middleMouse,
delay: scanningOptions.delay,
touchInputEnabled: scanningOptions.touchInputEnabled,
scanLength: scanningOptions.length,