diff options
Diffstat (limited to 'src/console/console.js')
-rw-r--r-- | src/console/console.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/console/console.js b/src/console/console.js index c32eca0..ae05001 100644 --- a/src/console/console.js +++ b/src/console/console.js @@ -195,9 +195,6 @@ const selectCompletion = (target) => { messages.receive(window, (message) => { switch (message.type) { - case 'vimvixen.console.show.command': - showCommand(message.text); - break; case 'vimvixen.console.show.error': showError(message.text); break; @@ -206,3 +203,11 @@ messages.receive(window, (message) => { break; } }); + +browser.runtime.onMessage.addListener((action) => { + switch (action.type) { + case 'vimvixen.console.show.command': + return showCommand(action.text); + } + return Promise.resolve(); +}); |