diff options
Diffstat (limited to 'src/pages/console.js')
-rw-r--r-- | src/pages/console.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/pages/console.js b/src/pages/console.js index feaf725..b90a9cd 100644 --- a/src/pages/console.js +++ b/src/pages/console.js @@ -30,21 +30,10 @@ completionStore.subscribe(() => { } }); -const update = (state) => { - consoleComponent.update(state); - - completionStore.dispatch(completionActions.setItems(state.completions)); -}; - browser.runtime.onMessage.addListener((action) => { if (action.type === messages.STATE_UPDATE) { - return update(action.state.console); + let state = action.state.console; + consoleComponent.update(state); + completionStore.dispatch(completionActions.setItems(state.completions)); } }); - -window.addEventListener('load', () => { - let error = window.document.querySelector('#vimvixen-console-error'); - let command = window.document.querySelector('#vimvixen-console-command'); - error.style.display = 'none'; - command.style.display = 'none'; -}); |