diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-15 17:32:12 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-15 21:19:46 +0900 |
commit | 9a808f45ed4acba8c8dc8af4738c582ac417bd49 (patch) | |
tree | 8d87dfc8627546c8ba67b99ae164ec6ca903e85b /src/content/index.js | |
parent | f66b7a1c2105bec2549f1fac640ff906a9d5184e (diff) |
implement simple open/tabopen command
Diffstat (limited to 'src/content/index.js')
-rw-r--r-- | src/content/index.js | 15 |
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: |