This commit is contained in:
Alex Yatskov 2016-08-18 21:48:40 -07:00
parent 70188eacb1
commit 28e217b75b
3 changed files with 23 additions and 7 deletions

View File

@ -39,8 +39,24 @@ function modelIdToFieldOptKey(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];
}

View File

@ -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: {}

View File

@ -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);
}