forked from GNUsocial/gnu-social
Preparing plugins for no-minify-in-core-policy
also making the file structure better with js and css folders for Realtime and LinkPreview
This commit is contained in:
2
plugins/Orbited/js/orbitedextra.js
Normal file
2
plugins/Orbited/js/orbitedextra.js
Normal file
@@ -0,0 +1,2 @@
|
||||
TCPSocket = Orbited.TCPSocket;
|
||||
|
24
plugins/Orbited/js/orbitedupdater.js
Normal file
24
plugins/Orbited/js/orbitedupdater.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
Reference in New Issue
Block a user