summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/data/options-schema.json6
-rw-r--r--ext/bg/js/options.js2
-rw-r--r--ext/bg/settings.html12
3 files changed, 18 insertions, 2 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json
index e2dd0573..52d96db9 100644
--- a/ext/bg/data/options-schema.json
+++ b/ext/bg/data/options-schema.json
@@ -324,6 +324,7 @@
"alphanumeric",
"autoHideResults",
"delay",
+ "hideDelay",
"length",
"modifier",
"deepDomScan",
@@ -360,6 +361,11 @@
"minimum": 0,
"default": 20
},
+ "hideDelay": {
+ "type": "number",
+ "minimum": 0,
+ "default": 0
+ },
"length": {
"type": "integer",
"minimum": 1,
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 9dc0c166..398fb95c 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -473,6 +473,7 @@ class OptionsUtil {
// Options conditions converted to string representations.
// Added usePopupWindow.
// Updated handlebars templates to include "clipboard-image" definition.
+ // Added hideDelay.
for (const {conditionGroups} of options.profiles) {
for (const {conditions} of conditionGroups) {
for (const condition of conditions) {
@@ -487,6 +488,7 @@ class OptionsUtil {
}
for (const {options: profileOptions} of options.profiles) {
profileOptions.general.usePopupWindow = false;
+ profileOptions.scanning.hideDelay = 0;
}
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');
return options;
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index 0ad5b79b..3fa14f49 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -415,8 +415,16 @@
</div>
<div class="form-group options-advanced">
- <label for="scan-delay">Scan delay <span class="label-light">(in milliseconds)</span></label>
- <input type="number" min="0" id="scan-delay" class="form-control" data-setting="scanning.delay">
+ <div class="row">
+ <div class="col-xs-6">
+ <label for="scan-delay">Scan delay <span class="label-light">(in milliseconds)</span></label>
+ <input type="number" min="0" id="scan-delay" class="form-control" data-setting="scanning.delay">
+ </div>
+ <div class="col-xs-6">
+ <label for="scan-close-delay">Auto-hide delay <span class="label-light">(in milliseconds)</span></label>
+ <input type="number" min="0" id="scan-close-delay" class="form-control" data-setting="scanning.hideDelay">
+ </div>
+ </div>
</div>
<div class="form-group options-advanced">