aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
Diffstat (limited to 'src/console')
-rw-r--r--src/console/console-frame.js4
-rw-r--r--src/console/console.js12
2 files changed, 4 insertions, 12 deletions
diff --git a/src/console/console-frame.js b/src/console/console-frame.js
index 8b4c17a..063026c 100644
--- a/src/console/console-frame.js
+++ b/src/console/console-frame.js
@@ -45,8 +45,4 @@ export default class ConsoleFrame {
isErrorShown() {
return this.element.style.display === 'block' && this.errorShown;
}
-
- setCompletions(completions) {
- return browser.runtime.sendMessage(consoleActions.setCompletions(completions));
- }
}
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', () => {