aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/scan-inputs-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-11 14:13:52 -0400
committerGitHub <noreply@github.com>2020-09-11 14:13:52 -0400
commita1729eb9aee9426cc9b543c865a53e843ae5f487 (patch)
tree8e95d5af6546623d52c5928219758e131212495c /ext/bg/js/settings/scan-inputs-controller.js
parent18634dca1a9cc1f0ea677f9bf0fe3971174d9d30 (diff)
Input type filters (#806)
* Add options for scanning input types * Move buttons in layout, refactor CSS * Add options for input types * Use input type filters * Add _getMatchingInputGroupFromEvent * Use input filters for touch events
Diffstat (limited to 'ext/bg/js/settings/scan-inputs-controller.js')
-rw-r--r--ext/bg/js/settings/scan-inputs-controller.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/settings/scan-inputs-controller.js b/ext/bg/js/settings/scan-inputs-controller.js
index 3b3945ff..3cd2b513 100644
--- a/ext/bg/js/settings/scan-inputs-controller.js
+++ b/ext/bg/js/settings/scan-inputs-controller.js
@@ -142,6 +142,11 @@ class ScanInputField {
this._eventListeners.on(this._includeInputField, 'change', this._onIncludeValueChange.bind(this));
this._eventListeners.on(this._excludeInputField, 'change', this._onExcludeValueChange.bind(this));
this._eventListeners.addEventListener(removeButton, 'click', this._onRemoveClick.bind(this));
+
+ for (const typeCheckbox of node.querySelectorAll('.scan-input-type-checkbox')) {
+ const {type} = typeCheckbox.dataset;
+ typeCheckbox.dataset.setting = `scanning.inputs[${this._index}].types.${type}`;
+ }
}
cleanup() {