Chrome application for ufojs supernodes
This chrome application enables a common ufo peer with the supernode functionalities.
Once obtained the source code with the usual git clone https://github.com/ufojs/supernode-plugin
, use npm install
to install all the dependancies and build the application.
Then you can install it by using Load unpacked extension... button from the Chrome settings page. As soon as possible I will implement the automatic bundler for the application.
All the tests can be run using npm test
.
Look at package.json
to learn all the project shortcuts.
You can interact with the plugin using the common Chrome APP interface. You have to:
\\ connect to the extension
var port = chrome.runtime.connect('cpbbgbmhgobhoakmbbjojjjdngnfbdbo');
\\ set the message callback
var onPortMessage = function(message) {
\\ it is fired when an external node sends a new message
...
\\ send a reply message to the external node using the Chrome message API
port.postMessage({ 'body': 'a message', 'destination': 'the destination' });
};
port.onMessage.addListener(onPortMessage);