summaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-15 19:39:58 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-15 19:39:58 -0400
commit0f0adf750c8cde668cdcf369cbe0ac173a9edf3f (patch)
treeac33e7efb308f06444a18feb535aab7fba6fd45f /ext/bg/js/options.js
parente23d4b9a82581f3cf1118e31d077fc9cdaff7573 (diff)
Add ability to save screenshot to anki cards
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index f1fc2cf8..96e390f4 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();
}
@@ -283,6 +287,11 @@ function optionsVersion(options) {
if (utilStringHashCode(options.anki.fieldTemplates) === 1285806040) {
options.anki.fieldTemplates = optionsFieldTemplates();
}
+ },
+ () => {
+ if (utilStringHashCode(options.anki.fieldTemplates) === -250091611) {
+ options.anki.fieldTemplates = optionsFieldTemplates();
+ }
}
];