aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-08-15 17:32:12 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-08-15 21:19:46 +0900
commit9a808f45ed4acba8c8dc8af4738c582ac417bd49 (patch)
tree8d87dfc8627546c8ba67b99ae164ec6ca903e85b /src/content/index.js
parentf66b7a1c2105bec2549f1fac640ff906a9d5184e (diff)
implement simple open/tabopen command
Diffstat (limited to 'src/content/index.js')
-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: