diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-02-05 11:44:59 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-02-05 11:44:59 -0800 |
commit | 5076b80f9690a12fda23d06b2c3ddd1df08cff56 (patch) | |
tree | 9f04555e22dd1387d8e3d80930e8a30497cd0719 /ext/bg/js/options-form.js | |
parent | a13c32a784ec41c9e46d841c14e790ffa4ab7466 (diff) |
tweaks for ankiconnect1.0.8
Diffstat (limited to 'ext/bg/js/options-form.js')
-rw-r--r-- | ext/bg/js/options-form.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index ed2826b4..00b6a63e 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -44,6 +44,7 @@ function getFormData() { optionsNew.anki.tags = $('#card-tags').val().split(/[,; ]+/); optionsNew.anki.htmlCards = $('#generate-html-cards').prop('checked'); optionsNew.anki.sentenceExt = parseInt($('#sentence-detection-extent').val(), 10); + optionsNew.anki.server = $('#interface-server').val(); if (optionsOld.anki.enable) { optionsNew.anki.terms.deck = $('#anki-terms-deck').val(); optionsNew.anki.terms.model = $('#anki-terms-model').val(); @@ -106,6 +107,7 @@ $(document).ready(() => { $('#card-tags').val(options.anki.tags.join(' ')); $('#generate-html-cards').prop('checked', options.anki.htmlCards); $('#sentence-detection-extent').val(options.anki.sentenceExt); + $('#interface-server').val(options.anki.server); $('input, select').not('.anki-model').change(onOptionsChanged); $('.anki-model').change(onAnkiModelChanged); @@ -399,7 +401,7 @@ function onOptionsChanged(e) { return optionsSave(optionsNew).then(() => { yomichan().setOptions(optionsNew); updateVisibility(optionsNew); - if (optionsNew.anki.enable !== optionsOld.anki.enable) { + if (optionsNew.anki.enable !== optionsOld.anki.enable || optionsNew.anki.server !== optionsOld.anki.server) { showAnkiError(null); showAnkiSpinner(true); return populateAnkiDeckAndModel(optionsNew); |