]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Orbited/orbitedupdater.js
Updated default theme to use the CSS Sprites method for common icons
[quix0rs-gnu-social.git] / plugins / Orbited / orbitedupdater.js
1 // Update the local timeline from a Orbited server
2
3 var OrbitedUpdater = function()
4 {
5      return {
6
7           init: function(server, port, timeline, username, password)
8           {
9                // set up stomp client.
10                stomp = new STOMPClient();
11
12                stomp.onmessageframe = function(frame) {
13                     RealtimeUpdate.receive(JSON.parse(frame.body));
14                };
15
16                stomp.onconnectedframe = function() {
17                     stomp.subscribe(timeline);
18                }
19
20                stomp.connect(server, port, username, password);
21           }
22      }
23 }();
24