diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-12 13:20:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 13:20:02 -0400 |
commit | c98aa9ad4751f1c35c164525eaec7e2411b0a5c4 (patch) | |
tree | e396459b236966fb7f3e8aa50aec5f42a06c16ec /ext/bg/js/options.js | |
parent | 41db9ec89b8eb76009f0cf8894aa0f6e2cc2f8bd (diff) |
More scanning options (#815)
* Reorganize options
* Add advanced options
* Add a setting transform 'setRelativeAttribute'
* Add advanced options to HTML/CSS
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index d3220194..3470da58 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -517,6 +517,12 @@ class OptionsUtil { } } } + const createInputDefaultOptions = () => ({ + showAdvanced: false, + scanOnPenHover: true, + scanOnPenPress: true, + scanOnPenRelease: false + }); for (const {options: profileOptions} of options.profiles) { profileOptions.general.usePopupWindow = false; profileOptions.scanning.hideDelay = 0; @@ -538,20 +544,23 @@ class OptionsUtil { scanningInputs.push({ include: modifierInput, exclude: '', - types: {mouse: true, touch: false, pen: false} + types: {mouse: true, touch: false, pen: false}, + options: createInputDefaultOptions() }); if (middleMouse) { scanningInputs.push({ include: 'mouse2', exclude: '', - types: {mouse: true, touch: false, pen: false} + types: {mouse: true, touch: false, pen: false}, + options: createInputDefaultOptions() }); } if (touchInputEnabled) { scanningInputs.push({ include: '', exclude: '', - types: {mouse: false, touch: true, pen: true} + types: {mouse: false, touch: true, pen: true}, + options: createInputDefaultOptions() }); } profileOptions.scanning.inputs = scanningInputs; |