aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-07 19:00:58 -0400
committerGitHub <noreply@github.com>2020-04-07 19:00:58 -0400
commitfa68a8773605ee0943e1c5e9766fa6bcfb6c6a42 (patch)
tree3ac714d3b485b1a1b6b349f48a91a67045256f81 /ext/bg/js/options.js
parent3df78904cf734da208c6fd1b6ae1cd6612323148 (diff)
parent29cf8d2f79f23b7723d508085ca242396bbbd5c9 (diff)
Merge pull request #415 from toasted-nutbread/anki-marker-document-title
Anki marker document title
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 5c68c403..abb054d4 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -91,6 +91,15 @@ const profileOptionsVersionUpdates = [
if (utilStringHashCode(options.anki.fieldTemplates) === 1444379824) {
options.anki.fieldTemplates = null;
}
+ },
+ (options) => {
+ // Version 13 changes:
+ // Default anki field tempaltes updated to include {document-title}.
+ let fieldTemplates = options.anki.fieldTemplates;
+ if (typeof fieldTemplates === 'string') {
+ fieldTemplates += '\n\n{{#*inline "document-title"}}\n {{~context.document.title~}}\n{{/inline}}';
+ options.anki.fieldTemplates = fieldTemplates;
+ }
}
];