summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-07 22:41:16 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-07 22:41:16 -0700
commit5db0d5d59ac794430a886a41eeb4ba18a9ee635a (patch)
tree9e80073fd447cd57e766c81babcf0a83bcb9fbbf /ext/bg
parentedbb8086bc834b837268d10a54371a0247d99827 (diff)
WIP
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/options-form.js6
-rw-r--r--ext/bg/js/options.js3
-rw-r--r--ext/bg/options.html12
3 files changed, 15 insertions, 6 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index a495813d..7504f74e 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -20,12 +20,14 @@
function optionsToForm(opts) {
$('#scanLength').val(opts.scanLength);
$('#loadOnStartup').prop('checked', opts.loadOnStartup);
+ $('#highlightText').prop('checked', opts.highlightText);
}
function formToOptions() {
return sanitizeOptions({
- scanLength: $('#scanLength').val(),
- loadOnStartup: $('#loadOnStartup').prop('checked')
+ scanLength: $('#scanLength').val(),
+ loadOnStartup: $('#loadOnStartup').prop('checked'),
+ highlightText: $('#highlightText').prop('checked')
});
}
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 0ab33612..0fedfe19 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -20,7 +20,8 @@
function sanitizeOptions(options) {
const defaults = {
scanLength: 20,
- loadOnStartup: false
+ loadOnStartup: false,
+ highlightText: true
};
for (const key in defaults) {
diff --git a/ext/bg/options.html b/ext/bg/options.html
index fb908d04..25831b38 100644
--- a/ext/bg/options.html
+++ b/ext/bg/options.html
@@ -21,9 +21,15 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
- <label>
- <input type="checkbox" id="loadOnStartup"> Load on startup
- </label>
+ <label><input type="checkbox" id="loadOnStartup"> Load on startup</label>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <div class="checkbox">
+ <label><input type="checkbox" id="highlightText" checked> Highlight text</label>
</div>
</div>
</div>