diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-10-03 16:46:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 16:46:15 -0400 |
commit | be8ef53e90c3893dc2696b846dadb185be8c4514 (patch) | |
tree | 93b75d0f2f974e12a2a3d33dc9b51dc674a43504 /ext/js/display/search-main.js | |
parent | d14268eb574d39b5ecc1e83302d45d5933770a73 (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/search-main.js')
-rw-r--r-- | ext/js/display/search-main.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/js/display/search-main.js b/ext/js/display/search-main.js index 7d39b3b7..a6479c86 100644 --- a/ext/js/display/search-main.js +++ b/ext/js/display/search-main.js @@ -17,6 +17,8 @@ /* global * Display + * DisplayAnki + * DisplayAudio * DocumentFocusController * HotkeyHandler * JapaneseUtil @@ -49,7 +51,13 @@ const display = new Display(tabId, frameId, 'search', japaneseUtil, documentFocusController, hotkeyHandler); await display.prepare(); - const searchDisplayController = new SearchDisplayController(tabId, frameId, display, japaneseUtil, searchPersistentStateController); + const displayAudio = new DisplayAudio(display); + displayAudio.prepare(); + + const displayAnki = new DisplayAnki(display, displayAudio, japaneseUtil); + displayAnki.prepare(); + + const searchDisplayController = new SearchDisplayController(tabId, frameId, display, displayAudio, japaneseUtil, searchPersistentStateController); await searchDisplayController.prepare(); display.initializeState(); |