From 03e1a03634ed5bccea3bddb3f6487effc7eb17db Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 18 Jan 2017 20:46:17 -0800 Subject: add option for html cards --- ext/bg/js/options-form.js | 2 ++ ext/bg/js/options.js | 1 + ext/bg/options.html | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index 7139958a..d3275926 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -41,6 +41,7 @@ function getFormData() { optionsNew.anki.enable = $('#anki-enable').prop('checked'); optionsNew.anki.tags = $('#card-tags').val().split(/[,; ]+/); + optionsNew.anki.htmlCards = $('#generate-html-cards').prop('checked'); optionsNew.anki.sentenceExt = parseInt($('#sentence-detection-extent').val(), 10); if (optionsOld.anki.enable) { optionsNew.anki.terms.deck = $('#anki-terms-deck').val(); @@ -101,6 +102,7 @@ $(document).ready(() => { $('#anki-enable').prop('checked', options.anki.enable); $('#card-tags').val(options.anki.tags.join(' ')); + $('#generate-html-cards').prop('checked', options.anki.htmlCards); $('#sentence-detection-extent').val(options.anki.sentenceExt); $('input, select').not('.anki-model').change(onOptionsChanged); $('.anki-model').change(onAnkiModelChanged); diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 4470c48a..dcf9d075 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -39,6 +39,7 @@ function optionsSetDefaults(options) { anki: { enable: false, tags: ['yomichan'], + htmlCards: true, sentenceExt: 200, terms: {deck: '', model: '', fields: {}}, kanji: {deck: '', model: '', fields: {}} diff --git a/ext/bg/options.html b/ext/bg/options.html index 6ab2e4e8..d12b50d4 100644 --- a/ext/bg/options.html +++ b/ext/bg/options.html @@ -142,6 +142,10 @@
+
+ +
+
-- cgit v1.2.3