diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-16 20:26:13 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-16 21:08:18 +0900 |
commit | c7a3dd16e666b5f844bc98f19e58a3fe9967b5a4 (patch) | |
tree | 58bc3b854a93a98dfc6f0e65f684f52c95bb8a77 /src/content | |
parent | 83cb277ba2af2bc2f87ace1d97fa582a7043bcd5 (diff) |
message constants
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content/index.js b/src/content/index.js index d81e83e..43d632e 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -5,6 +5,7 @@ import * as scrolls from '../content/scrolls'; import * as histories from '../content/histories'; import Follow from '../content/follow'; import operations from '../operations'; +import messages from '../messages'; consoleFrames.initialize(window.document); @@ -51,9 +52,9 @@ const update = (state) => { browser.runtime.onMessage.addListener((action) => { switch (action.type) { - case 'state.changed': + case messages.STATE_UPDATE: return update(action.state); - case 'require.content.operation': + case messages.CONTENT_OPERATION: execOperation(action.operation); return Promise.resolve(); default: |