aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-04 20:39:23 -0500
committerGitHub <noreply@github.com>2020-11-04 20:39:23 -0500
commit5b9d709d4087c7d2b4210319840f6fc7b454d3b1 (patch)
tree14e71808fc6b8e805c6e8e385cc7555414cdf08d /ext/bg/js
parent255c8b724e036d9d38e1dab4540974d11fc00bfa (diff)
Conjugation marker (#988)
* Add {conjugation} marker * Add info * Add upgrade * Update test
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js11
-rw-r--r--ext/bg/js/settings/anki-controller.js1
2 files changed, 12 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 668be98e..00d4725a 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -477,6 +477,10 @@ class OptionsUtil {
{
async: false,
update: this._updateVersion5.bind(this)
+ },
+ {
+ async: true,
+ update: this._updateVersion6.bind(this)
}
];
}
@@ -604,4 +608,11 @@ class OptionsUtil {
}
return options;
}
+
+ async _updateVersion6(options) {
+ // Version 6 changes:
+ // Updated handlebars templates to include "conjugation" definition.
+ await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v6.handlebars');
+ return options;
+ }
}
diff --git a/ext/bg/js/settings/anki-controller.js b/ext/bg/js/settings/anki-controller.js
index c205c160..d9b1591e 100644
--- a/ext/bg/js/settings/anki-controller.js
+++ b/ext/bg/js/settings/anki-controller.js
@@ -79,6 +79,7 @@ class AnkiController {
'cloze-body',
'cloze-prefix',
'cloze-suffix',
+ 'conjugation',
'dictionary',
'document-title',
'expression',