diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-01 10:00:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 15:00:59 +0000 |
commit | dfd42bad0b46845ad88d1fdc5fa82b4f03bab0f3 (patch) | |
tree | 04686b943b84b33b8927238be17e4bc0dda7eb62 /ext/js/display/display-generator.js | |
parent | 2356223942a21d1683ac38eed8e7b9485f453d87 (diff) |
Application refactor (#591)
* Rename Yomitan class to Application, change initialization style
* Rename file
* Update init
* Update config
* Remove dead code
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r-- | ext/js/display/display-generator.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 01f6f38b..fdfe3d4a 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -21,7 +21,6 @@ import {isObject} from '../core/utilities.js'; import {getDisambiguations, getGroupedPronunciations, getTermFrequency, groupKanjiFrequencies, groupTermFrequencies, groupTermTags, isNonNounVerbOrAdjective} from '../dictionary/dictionary-data-util.js'; import {HtmlTemplateCollection} from '../dom/html-template-collection.js'; import {distributeFurigana, getKanaMorae, getPitchCategory, isCodePointKanji, isStringPartiallyJapanese} from '../language/japanese.js'; -import {yomitan} from '../yomitan.js'; import {createPronunciationDownstepPosition, createPronunciationGraph, createPronunciationText} from './sandbox/pronunciation-generator.js'; import {StructuredContentGenerator} from './sandbox/structured-content-generator.js'; @@ -40,9 +39,11 @@ export class DisplayGenerator { this._structuredContentGenerator = new StructuredContentGenerator(this._contentManager, document); } - /** */ - async prepare() { - const html = await yomitan.api.getDisplayTemplatesHtml(); + /** + * @param {import('../comm/api.js').API} api + */ + async prepare(api) { + const html = await api.getDisplayTemplatesHtml(); this._templates.load(html); this.updateHotkeys(); } |