aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-16 15:29:42 -0500
committerGitHub <noreply@github.com>2021-01-16 15:29:42 -0500
commitb2342945403c27e346446bbe316f075ed2b13eff (patch)
tree690a065de66ece5e0b395dbc2811d3d9fdbe13f9 /ext/bg/js/options.js
parent0ac35771192adb87d76809aff171d60a5d0018c3 (diff)
Stroke count marker (#1251)
* Add stroke-count definition * Update options * Update documentation * Add helper
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 026d75c5..a8cdd885 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -487,7 +487,7 @@ class OptionsUtil {
update: this._updateVersion7.bind(this)
},
{
- async: false,
+ async: true,
update: this._updateVersion8.bind(this)
}
];
@@ -680,7 +680,7 @@ class OptionsUtil {
return options;
}
- _updateVersion8(options) {
+ async _updateVersion8(options) {
// Version 8 changes:
// Added translation.textReplacements.
// Moved anki.sentenceExt to sentenceParsing.scanExtent.
@@ -690,6 +690,8 @@ class OptionsUtil {
// Added inputs.hotkeys.
// Added anki.suspendNewCards.
// Added popupWindow.
+ // Updated handlebars templates to include "stroke-count" definition.
+ await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v8.handlebars');
for (const profile of options.profiles) {
profile.options.translation.textReplacements = {
searchOriginal: true,