diff options
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/search-main.js | 7 | ||||
-rw-r--r-- | ext/bg/js/search.js | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ext/bg/js/search-main.js b/ext/bg/js/search-main.js index 73bc6750..38c6f4dd 100644 --- a/ext/bg/js/search-main.js +++ b/ext/bg/js/search-main.js @@ -18,6 +18,7 @@ /* global * DisplaySearch * DocumentFocusController + * HotkeyHandler * JapaneseUtil * api * wanakana @@ -32,7 +33,11 @@ await yomichan.backendReady(); const japaneseUtil = new JapaneseUtil(wanakana); - const displaySearch = new DisplaySearch(japaneseUtil, documentFocusController); + + const hotkeyHandler = new HotkeyHandler(); + hotkeyHandler.prepare(); + + const displaySearch = new DisplaySearch(japaneseUtil, documentFocusController, hotkeyHandler); await displaySearch.prepare(); document.documentElement.dataset.loaded = 'true'; diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 5963c03b..e2497264 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -23,8 +23,8 @@ */ class DisplaySearch extends Display { - constructor(japaneseUtil, documentFocusController) { - super('search', japaneseUtil, documentFocusController); + constructor(japaneseUtil, documentFocusController, hotkeyHandler) { + super('search', japaneseUtil, documentFocusController, hotkeyHandler); this._searchButton = document.querySelector('#search-button'); this._queryInput = document.querySelector('#search-textbox'); this._introElement = document.querySelector('#intro'); |