aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display-anki.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display-anki.js')
-rw-r--r--ext/js/display/display-anki.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/ext/js/display/display-anki.js b/ext/js/display/display-anki.js
index 68a6654c..fc242549 100644
--- a/ext/js/display/display-anki.js
+++ b/ext/js/display/display-anki.js
@@ -149,7 +149,7 @@ export class DisplayAnki {
glossaryLayoutMode: this._glossaryLayoutMode,
compactTags: this._compactTags,
marker: 'test',
- dictionaryStylesMap: this._getDictionaryStylesMap(),
+ dictionaryStylesMap: this._ankiNoteBuilder.getDictionaryStylesMap(this._dictionaries),
});
} catch (e) {
ankiNoteDataException = e;
@@ -813,7 +813,7 @@ export class DisplayAnki {
const details = this._ankiNoteBuilder.getDictionaryEntryDetailsForNote(dictionaryEntry);
const audioDetails = this._getAnkiNoteMediaAudioDetails(details);
const optionsContext = this._display.getOptionsContext();
- const dictionaryStylesMap = this._getDictionaryStylesMap();
+ const dictionaryStylesMap = this._ankiNoteBuilder.getDictionaryStylesMap(this._dictionaries);
const {note, errors, requirements: outputRequirements} = await this._ankiNoteBuilder.createNote({
dictionaryEntry,
@@ -848,20 +848,6 @@ export class DisplayAnki {
}
/**
- * @returns {Map<string, string>}
- */
- _getDictionaryStylesMap() {
- const styleMap = new Map();
- for (const dictionary of this._dictionaries) {
- const {name, styles} = dictionary;
- if (typeof styles === 'string') {
- styleMap.set(name, styles);
- }
- }
- return styleMap;
- }
-
- /**
* @param {boolean} isTerms
* @returns {import('display-anki').CreateMode[]}
*/