aboutsummaryrefslogtreecommitdiff
path: root/src/console/index.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/index.jsx')
-rw-r--r--src/console/index.jsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/console/index.jsx b/src/console/index.jsx
index c0d1807..dfd323e 100644
--- a/src/console/index.jsx
+++ b/src/console/index.jsx
@@ -38,6 +38,5 @@ const onMessage = (message) => {
};
browser.runtime.onMessage.addListener(onMessage);
-window.addEventListener('message', (event) => {
- onMessage(JSON.parse(event.data));
-}, false);
+let port = browser.runtime.connect({ name: 'vimvixen-console' });
+port.onMessage.addListener(onMessage);