gnu-social/plugins/Orbited/js/orbitedupdater.js
Mikael Nordfeldth 97830b0701 Preparing plugins for no-minify-in-core-policy
also making the file structure better with js and css folders for Realtime and LinkPreview
2014-02-24 01:01:34 +01:00

25 lines
614 B
JavaScript

// Update the local timeline from a Orbited server
var OrbitedUpdater = function()
{
return {
init: function(server, port, timeline, username, password)
{
// set up stomp client.
stomp = new STOMPClient();
stomp.onmessageframe = function(frame) {
RealtimeUpdate.receive(JSON.parse(frame.body));
};
stomp.onconnectedframe = function() {
stomp.subscribe(timeline);
}
stomp.connect(server, port, username, password);
}
}
}();