aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/options-form.js22
-rw-r--r--ext/bg/js/options.js6
-rw-r--r--ext/bg/js/yomichan.js2
3 files changed, 23 insertions, 7 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 62c5e7b2..3dab0a87 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -32,15 +32,31 @@ function fieldsToDict(selection) {
function modelIdToFieldOptKey(id) {
return {
- 'anki-term-model': 'ankiTermFields',
+ 'anki-term-model': 'ankiTermFields',
'anki-kanji-model': 'ankiKanjiFields'
}[id];
}
function modelIdToMarkers(id) {
return {
- 'anki-term-model': ['audio', 'expression', 'glossary', 'glossary-list', 'reading', 'sentence', 'tags', 'url'],
- 'anki-kanji-model': ['character', 'glossary', 'glossary-list', 'kunyomi', 'onyomi', 'url'],
+ 'anki-term-model': [
+ 'audio',
+ 'expression',
+ 'glossary',
+ 'glossary-list',
+ 'reading',
+ 'sentence',
+ 'tags',
+ 'url'
+ ],
+ 'anki-kanji-model': [
+ 'character',
+ 'glossary',
+ 'glossary-list',
+ 'kunyomi',
+ 'onyomi',
+ 'url'
+ ],
}[id];
}
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 8a6f633a..831bb817 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -28,9 +28,9 @@ function sanitizeOptions(options) {
enableAnkiConnect: false,
ankiCardTags: ['yomichan'],
sentenceExtent: 200,
- ankiTermDeck: options.ankiVocabDeck || '',
- ankiTermModel: options.ankiVocabModel || '',
- ankiTermFields: options.ankiVocabFields || {},
+ ankiTermDeck: '',
+ ankiTermModel: '',
+ ankiTermFields: {},
ankiKanjiDeck: '',
ankiKanjiModel: '',
ankiKanjiFields: {}
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 4ba28e34..b8fa9593 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -248,7 +248,7 @@ class Yomichan {
}
}
- for (let name in fields) {
+ for (const name in fields) {
note.fields[name] = this.formatField(fields[name], definition, mode);
}