diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-07 18:38:57 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-07 18:50:43 +0900 |
commit | 8ff302a1f2870994cddc36fd461879eac951203d (patch) | |
tree | 3a07b64768937516dc7d43958b77dfcf77856126 /src/components/background.js | |
parent | a6b197ca73a6be50c5c5bf391391c9971ff8c5e2 (diff) |
store input keys in content script
Diffstat (limited to 'src/components/background.js')
-rw-r--r-- | src/components/background.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/background.js b/src/components/background.js index de44dae..79a7a6a 100644 --- a/src/components/background.js +++ b/src/components/background.js @@ -1,5 +1,5 @@ import messages from 'content/messages'; -import * as inputActions from 'actions/input'; +import * as operationActions from 'actions/operation'; import * as settingsActions from 'actions/setting'; import * as tabActions from 'actions/tab'; import * as commands from 'shared/commands'; @@ -37,9 +37,10 @@ export default class BackgroundComponent { onMessage(message, sender) { switch (message.type) { - case messages.KEYDOWN: + case messages.BACKGROUND_OPERATION: return this.store.dispatch( - inputActions.keyPress(message.key, message.ctrl), sender); + operationActions.execBackground(message.operation, sender.tab), + sender); case messages.OPEN_URL: if (message.newTab) { return this.store.dispatch( @@ -70,7 +71,7 @@ export default class BackgroundComponent { } onTabUpdated(id, info) { - if (info.url) { + if (info.status === 'complete') { this.syncSettings(id); } } |