diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-17 16:55:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 16:55:45 -0500 |
commit | 14b4aee07dc3f69ad75518cf04cafe416e06f0c7 (patch) | |
tree | 407918a74817284cd9f1d474a6c7783033e7a4c6 /ext/bg/js/search-main.js | |
parent | 8ec48456e6d73e10239469c39e7862365db43739 (diff) |
Hotkey forwarding support (#1263)
* Add support for allowing HotkeyHandler to forward hotkeys
* Update hotkey registration
* Pass HotkeyHandler instance into Display* constructor
* Implement hotkey forwarding
Diffstat (limited to 'ext/bg/js/search-main.js')
-rw-r--r-- | ext/bg/js/search-main.js | 7 |
1 files changed, 6 insertions, 1 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'; |