diff options
author | Alex Yatskov <FooSoft@users.noreply.github.com> | 2019-08-17 09:05:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 09:05:33 -0700 |
commit | 8ebac935e8c0ee167514d5726b1e2e16921e4957 (patch) | |
tree | 905897bbe19b754597b31b89332e09d45a163c5e /ext/bg/js/options.js | |
parent | 1d25c8a744837b02b5d4364d93df65dd4d0b7ed6 (diff) | |
parent | 3a5b06bd1078d39cf9b29cbc05a0cde13c96ca94 (diff) |
Merge pull request #182 from toasted-nutbread/anki-screenshot
Anki screenshot
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r-- | ext/bg/js/options.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index f1fc2cf8..29d8a215 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -175,6 +175,10 @@ function optionsFieldTemplates() { <a href="{{definition.url}}">{{definition.url}}</a> {{/inline}} +{{#*inline "screenshot"}} + <img src="{{definition.screenshotFileName}}" /> +{{/inline}} + {{~> (lookup . "marker") ~}} `.trim(); } @@ -220,6 +224,7 @@ function optionsSetDefaults(options) { server: 'http://127.0.0.1:8765', tags: ['yomichan'], sentenceExt: 200, + screenshot: {format: 'png', quality: 92}, terms: {deck: '', model: '', fields: {}}, kanji: {deck: '', model: '', fields: {}}, fieldTemplates: optionsFieldTemplates() @@ -283,6 +288,11 @@ function optionsVersion(options) { if (utilStringHashCode(options.anki.fieldTemplates) === 1285806040) { options.anki.fieldTemplates = optionsFieldTemplates(); } + }, + () => { + if (utilStringHashCode(options.anki.fieldTemplates) === -250091611) { + options.anki.fieldTemplates = optionsFieldTemplates(); + } } ]; |