aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/index.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/content/index.js b/src/content/index.js
index 8cf0aed..ed33961 100644
--- a/src/content/index.js
+++ b/src/content/index.js
@@ -12,7 +12,20 @@ const invokeEvent = (action) => {
switch (action[0]) {
case actions.CMD_OPEN:
footer = new FooterLine(document);
- footer.input.value = ':';
+ footer.onPromptChange((e) => {
+ let request = {
+ type: 'event.cmd.suggest',
+ text: e.target.value
+ };
+ browser.runtime.sendMessage(request);
+ });
+ footer.onEntered((e) => {
+ let request = {
+ type: 'event.cmd.enter',
+ text: e.target.value
+ };
+ browser.runtime.sendMessage(request);
+ });
footer.focus();
break;
case actions.SCROLL_UP: