aboutsummaryrefslogtreecommitdiff
path: root/src/console/console.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/console.js')
-rw-r--r--src/console/console.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/console/console.js b/src/console/console.js
index 35d98e0..d79e154 100644
--- a/src/console/console.js
+++ b/src/console/console.js
@@ -1,4 +1,5 @@
import './console.scss';
+import * as backgroundActions from '../actions/background';
import Completion from './completion';
import consoleReducer from '../reducers/console';
@@ -21,13 +22,6 @@ const keydownMessage = (input) => {
};
};
-const keyupMessage = (input) => {
- return {
- type: 'vimvixen.command.change',
- value: input.value
- };
-};
-
const handleBlur = () => {
return browser.runtime.sendMessage(blurMessage());
};
@@ -88,7 +82,9 @@ const handleKeyup = (e) => {
return;
}
prevValue = e.target.value;
- return browser.runtime.sendMessage(keyupMessage(e.target));
+ return browser.runtime.sendMessage(
+ backgroundActions.requestCompletions(e.target.value)
+ );
};
window.addEventListener('load', () => {