summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings.js
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-08-17 09:05:33 -0700
committerGitHub <noreply@github.com>2019-08-17 09:05:33 -0700
commit8ebac935e8c0ee167514d5726b1e2e16921e4957 (patch)
tree905897bbe19b754597b31b89332e09d45a163c5e /ext/bg/js/settings.js
parent1d25c8a744837b02b5d4364d93df65dd4d0b7ed6 (diff)
parent3a5b06bd1078d39cf9b29cbc05a0cde13c96ca94 (diff)
Merge pull request #182 from toasted-nutbread/anki-screenshot
Anki screenshot
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r--ext/bg/js/settings.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index 953120da..75082f3e 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -51,6 +51,8 @@ async function formRead() {
optionsNew.anki.tags = $('#card-tags').val().split(/[,; ]+/);
optionsNew.anki.sentenceExt = parseInt($('#sentence-detection-extent').val(), 10);
optionsNew.anki.server = $('#interface-server').val();
+ optionsNew.anki.screenshot.format = $('#screenshot-format').val();
+ optionsNew.anki.screenshot.quality = parseInt($('#screenshot-quality').val(), 10);
optionsNew.anki.fieldTemplates = $('#field-templates').val();
if (optionsOld.anki.enable && !ankiErrorShown()) {
@@ -188,6 +190,8 @@ async function onReady() {
$('#card-tags').val(options.anki.tags.join(' '));
$('#sentence-detection-extent').val(options.anki.sentenceExt);
$('#interface-server').val(options.anki.server);
+ $('#screenshot-format').val(options.anki.screenshot.format);
+ $('#screenshot-quality').val(options.anki.screenshot.quality);
$('#field-templates').val(options.anki.fieldTemplates);
$('#field-templates-reset').click(utilAsync(onAnkiFieldTemplatesReset));
$('input, select, textarea').not('.anki-model').change(utilAsync(onFormOptionsChanged));
@@ -505,7 +509,8 @@ async function ankiFieldsPopulate(element, options) {
'reading',
'sentence',
'tags',
- 'url'
+ 'url',
+ 'screenshot'
],
'kanji': [
'character',