From e5284988e2beda4133caae8a6b1c7e4d16f4328b Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 26 Jun 2021 15:49:23 -0400 Subject: Structured content generation updates (#1760) * Simplify _createElement, fix misuse of classList * Don't use templates to generate image content * Omit templates --- ext/js/display/display-generator.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/js/display/display-generator.js') diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 74b3fdca..737fa72a 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -27,14 +27,13 @@ class DisplayGenerator { this._mediaLoader = mediaLoader; this._hotkeyHelpController = hotkeyHelpController; this._templates = null; - this._structuredContentGenerator = null; + this._structuredContentGenerator = new StructuredContentGenerator(this._mediaLoader, document); this._termPitchAccentStaticTemplateIsSetup = false; } async prepare() { const html = await yomichan.api.getDisplayTemplatesHtml(); this._templates = new HtmlTemplateCollection(html); - this._structuredContentGenerator = new StructuredContentGenerator(this._templates, this._mediaLoader, document); this.updateHotkeys(); } -- cgit v1.2.3