aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-09-14 22:54:07 -0700
committerAlex Yatskov <alex@foosoft.net>2016-09-14 22:54:07 -0700
commit3608c9c16e7154802bacbf38356fd4f36824e267 (patch)
treef7fff55dafe6afd6a9bc0e757e89f705f9d1cdd9 /ext/bg
parentc3ead3af939c7e235b891244a09a25c180c34a8f (diff)
.
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/options-form.js4
-rw-r--r--ext/bg/js/options.js6
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 81bf39a5..1cd050b4 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -229,12 +229,12 @@ function onAnkiModelChanged(e) {
$(document).ready(() => {
loadOptions().then(opts => {
- $('#scan-length').val(opts.scanLength);
$('#activate-on-startup').prop('checked', opts.activateOnStartup);
$('#select-matched-text').prop('checked', opts.selectMatchedText);
- $('#show-advanced-options').prop('checked', opts.showAdvancedOptions);
$('#enable-audio-playback').prop('checked', opts.enableAudioPlayback);
$('#enable-anki-connect').prop('checked', opts.enableAnkiConnect);
+ $('#show-advanced-options').prop('checked', opts.showAdvancedOptions);
+ $('#scan-length').val(opts.scanLength);
$('#anki-card-tags').val(opts.ankiCardTags.join(' '));
$('#sentence-extent').val(opts.sentenceExtent);
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 857f59f2..290b5b05 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -19,14 +19,16 @@
function sanitizeOptions(options) {
const defaults = {
- scanLength: 20,
activateOnStartup: false,
selectMatchedText: true,
- showAdvancedOptions: false,
enableAudioPlayback: true,
enableAnkiConnect: false,
+ showAdvancedOptions: false,
+ scanLength: 20,
+
ankiCardTags: ['yomichan'],
sentenceExtent: 200,
+
ankiTermDeck: '',
ankiTermModel: '',
ankiTermFields: {},