aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-10-21 20:15:00 -0700
committerAlex Yatskov <alex@foosoft.net>2016-10-21 20:15:00 -0700
commit5467ed11e10addf2ceedf062ce151d88ea448fd1 (patch)
treeaf1a1df8e4c9ac4cd9370ed90b191f181ef82462 /ext
parent25a8f4fb6820cbd4be9286c85a00165ce01c0704 (diff)
Adding soft katakana search option
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/options-form.js3
-rw-r--r--ext/bg/js/options.js1
-rw-r--r--ext/bg/options.html4
3 files changed, 8 insertions, 0 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index b4558a56..eb562142 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -72,6 +72,7 @@ function getFormValues() {
optsNew.activateOnStartup = $('#activate-on-startup').prop('checked');
optsNew.enableAudioPlayback = $('#enable-audio-playback').prop('checked');
optsNew.showAdvancedOptions = $('#show-advanced-options').prop('checked');
+ optsNew.enableSoftKatakanaSearch = $('#enable-soft-katakana-search').prop('checked');
optsNew.holdShiftToScan = $('#hold-shift-to-scan').prop('checked');
optsNew.selectMatchedText = $('#select-matched-text').prop('checked');
@@ -256,7 +257,9 @@ $(document).ready(() => {
loadOptions().then(opts => {
$('#activate-on-startup').prop('checked', opts.activateOnStartup);
$('#enable-audio-playback').prop('checked', opts.enableAudioPlayback);
+ $('#enable-soft-katakana-search').prop('checked', opts.enableSoftKatakanaSearch);
$('#show-advanced-options').prop('checked', opts.showAdvancedOptions);
+
$('#hold-shift-to-scan').prop('checked', opts.holdShiftToScan);
$('#select-matched-text').prop('checked', opts.selectMatchedText);
$('#scan-delay').val(opts.scanDelay);
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 45af2ff1..15288afc 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -21,6 +21,7 @@ function sanitizeOptions(options) {
const defaults = {
activateOnStartup: true,
enableAudioPlayback: true,
+ enableSoftKatakanaSearch: true,
showAdvancedOptions: false,
selectMatchedText: true,
holdShiftToScan: true,
diff --git a/ext/bg/options.html b/ext/bg/options.html
index e0b9960c..42029727 100644
--- a/ext/bg/options.html
+++ b/ext/bg/options.html
@@ -32,6 +32,10 @@
</div>
<div class="checkbox">
+ <label><input type="checkbox" id="enable-soft-katakana-search"> Enable soft Katakana search</label>
+ </div>
+
+ <div class="checkbox">
<label><input type="checkbox" id="show-advanced-options"> Show advanced options</label>
</div>
</div>