diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-01 10:09:24 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-01 10:09:24 +0900 |
commit | 709fa95aa383b75e88fb12512f772ea55d757b06 (patch) | |
tree | cfec09d9c626b2f0898d59937accd73651ab2168 /src/pages | |
parent | be5f4d12d5afc12f25b1e2732075ee416f5665bf (diff) |
clean console.js
Diffstat (limited to 'src/pages')
-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'; -}); |