aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/popup-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-10-03 16:46:15 -0400
committerGitHub <noreply@github.com>2021-10-03 16:46:15 -0400
commitbe8ef53e90c3893dc2696b846dadb185be8c4514 (patch)
tree93b75d0f2f974e12a2a3d33dc9b51dc674a43504 /ext/js/display/popup-main.js
parentd14268eb574d39b5ecc1e83302d45d5933770a73 (diff)
Display refactoring (#1978)
* Refactor _setContentTermsOrKanji * Update query assignment * Simplify * Remove redundant _updateQueryParser * Reorder query assignment * Remove isTerms, replace with isKanji * Simplify defaults * Refactor events * Update DisplayAnki to use events * Simplify * Update DisplayAudio to use events * Simplify * Move audio hotkeys * Add frameVisibilityChange event * Fix name * Add logDictionaryEntryData event * Move clearAutoPlayTimer handler * Fix call * Externalize DisplayAnki and DisplayAudio from Display * Simplify clear
Diffstat (limited to 'ext/js/display/popup-main.js')
-rw-r--r--ext/js/display/popup-main.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/js/display/popup-main.js b/ext/js/display/popup-main.js
index 0b5e338d..8621e200 100644
--- a/ext/js/display/popup-main.js
+++ b/ext/js/display/popup-main.js
@@ -17,6 +17,8 @@
/* global
* Display
+ * DisplayAnki
+ * DisplayAudio
* DisplayProfileSelection
* DisplayResizer
* DocumentFocusController
@@ -41,6 +43,12 @@
const display = new Display(tabId, frameId, 'popup', japaneseUtil, documentFocusController, hotkeyHandler);
await display.prepare();
+ const displayAudio = new DisplayAudio(display);
+ displayAudio.prepare();
+
+ const displayAnki = new DisplayAnki(display, displayAudio, japaneseUtil);
+ displayAnki.prepare();
+
const displayProfileSelection = new DisplayProfileSelection(display);
displayProfileSelection.prepare();