aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-08 16:25:07 -0500
committerGitHub <noreply@github.com>2020-11-08 16:25:07 -0500
commit16321a1f8c9902be100b01067e1593694fa51341 (patch)
tree2cb25c4fe0447e58c91338cdce69e7b370518d25 /ext/bg/js/options.js
parent4e3040941038acc4f739e4077aee14cb64d3aa81 (diff)
Add duplicate check option (#1012)
* Add anki.checkForDuplicates option * Use checkForDuplicates for button display * Add property to card creation
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 0edbb82a..bb90e655 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -613,8 +613,12 @@ class OptionsUtil {
// Version 6 changes:
// Updated handlebars templates to include "conjugation" definition.
// Added global option showPopupPreview.
+ // Added anki.checkForDuplicates.
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v6.handlebars');
options.global.showPopupPreview = false;
+ for (const profile of options.profiles) {
+ profile.options.anki.checkForDuplicates = true;
+ }
return options;
}
}