aboutsummaryrefslogtreecommitdiff
path: root/src/background/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 20:04:34 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-17 20:04:34 +0900
commitbf07e89126989cc555a10848ddf18589fffe2e49 (patch)
tree829eff07a3dff006ca5c3a98cbe4dd3af3697282 /src/background/index.js
parent78233b25b76df55d519f1d9082267aba876b4835 (diff)
parent1880df95f60f1410a83b6af65ec9b8a74c2f59f2 (diff)
Merge branch 'improve-follow-command'
Diffstat (limited to 'src/background/index.js')
-rw-r--r--src/background/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/background/index.js b/src/background/index.js
index a4217c1..9df22fd 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -3,6 +3,7 @@ import * as inputActions from '../actions/input';
import * as operationActions from '../actions/operation';
import * as commandActions from '../actions/command';
import * as consoleActions from '../actions/console';
+import * as tabActions from '../actions/tab';
import reducers from '../reducers';
import messages from '../messages';
import * as store from '../store';
@@ -60,6 +61,13 @@ const handleMessage = (message, sender) => {
case messages.KEYDOWN:
return backgroundStore.dispatch(
inputActions.keyPress(message.code, message.ctrl), sender);
+ case messages.OPEN_URL:
+ if (message.newTab) {
+ return backgroundStore.dispatch(
+ tabActions.openNewTab(message.url), sender);
+ }
+ return backgroundStore.dispatch(
+ tabActions.openToTab(message.url, sender.tab), sender);
case messages.CONSOLE_BLURRED:
return backgroundStore.dispatch(
consoleActions.hide(), sender);