summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-16 23:08:43 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-16 23:08:43 -0700
commit9280985306f5a9c79b9bd2c4daea596a5ec78ae5 (patch)
tree3feed98555c924983bbea83187ea35f8657bbc68 /ext/bg/js
parent5a531541238b52ba56475ae3f91873bd1b8a9d10 (diff)
add option to automatically hide search results (fixes #71)
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js1
-rw-r--r--ext/bg/js/settings.js2
2 files changed, 3 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index dcad97d4..a245da80 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -146,6 +146,7 @@ function optionsSetDefaults(options) {
middleMouse: true,
selectText: true,
alphanumeric: true,
+ autoHideResults: false,
delay: 15,
length: 10,
modifier: 'shift'
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index a2580c35..d73d7509 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -35,6 +35,7 @@ async function formRead() {
optionsNew.scanning.middleMouse = $('#middle-mouse-button-scan').prop('checked');
optionsNew.scanning.selectText = $('#select-matched-text').prop('checked');
optionsNew.scanning.alphanumeric = $('#search-alphanumeric').prop('checked');
+ optionsNew.scanning.autoHideResults = $('#auto-hide-results').prop('checked');
optionsNew.scanning.delay = parseInt($('#scan-delay').val(), 10);
optionsNew.scanning.length = parseInt($('#scan-length').val(), 10);
optionsNew.scanning.modifier = $('#scan-modifier-key').val();
@@ -136,6 +137,7 @@ async function onReady() {
$('#middle-mouse-button-scan').prop('checked', options.scanning.middleMouse);
$('#select-matched-text').prop('checked', options.scanning.selectText);
$('#search-alphanumeric').prop('checked', options.scanning.alphanumeric);
+ $('#auto-hide-results').prop('checked', options.scanning.autoHideResults);
$('#scan-delay').val(options.scanning.delay);
$('#scan-length').val(options.scanning.length);
$('#scan-modifier-key').val(options.scanning.modifier);