summaryrefslogtreecommitdiff
path: root/ext/bg/js/anki-note-builder.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-25 23:22:05 -0500
committerGitHub <noreply@github.com>2020-11-25 23:22:05 -0500
commit92e9f69c8069644c544301a51fbbd351e799e99d (patch)
tree621bea652f78ab9e5b6850512ababeece243f908 /ext/bg/js/anki-note-builder.js
parentc6c4631817247c44f788b1ffa2bc1d9f644802eb (diff)
Popup style updates (#1066)
* Replace compactGlossaries option with new glossaryLayoutMode option * Update attributes * Update attributes * Update color definitions * Fix default theme scrollbar
Diffstat (limited to 'ext/bg/js/anki-note-builder.js')
-rw-r--r--ext/bg/js/anki-note-builder.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/bg/js/anki-note-builder.js b/ext/bg/js/anki-note-builder.js
index d1e918c9..33cd3a0b 100644
--- a/ext/bg/js/anki-note-builder.js
+++ b/ext/bg/js/anki-note-builder.js
@@ -34,7 +34,7 @@ class AnkiNoteBuilder {
checkForDuplicates=true,
duplicateScope='collection',
resultOutputMode='split',
- compactGlossaries=false,
+ glossaryLayoutMode='default',
compactTags=false,
modeOptions: {fields, deck, model},
audioDetails=null,
@@ -71,7 +71,7 @@ class AnkiNoteBuilder {
}
};
- const data = this._createNoteData(definition, mode, context, resultOutputMode, compactGlossaries, compactTags);
+ const data = this._createNoteData(definition, mode, context, resultOutputMode, glossaryLayoutMode, compactTags);
const formattedFieldValuePromises = [];
for (const [, fieldValue] of fieldEntries) {
const formattedFieldValuePromise = this._formatField(fieldValue, data, templates, errors);
@@ -105,7 +105,7 @@ class AnkiNoteBuilder {
// Private
- _createNoteData(definition, mode, context, resultOutputMode, compactGlossaries, compactTags) {
+ _createNoteData(definition, mode, context, resultOutputMode, glossaryLayoutMode, compactTags) {
const pitches = DictionaryDataUtil.getPitchAccentInfos(definition);
const pitchCount = pitches.reduce((i, v) => i + v.pitches.length, 0);
return {
@@ -118,7 +118,8 @@ class AnkiNoteBuilder {
modeTermKanji: mode === 'term-kanji',
modeTermKana: mode === 'term-kana',
modeKanji: mode === 'kanji',
- compactGlossaries,
+ compactGlossaries: (glossaryLayoutMode === 'compact'),
+ glossaryLayoutMode,
compactTags,
context
};