-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
executable file
·28 lines (23 loc) · 1.01 KB
/
README.txt
File metadata and controls
executable file
·28 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
A quickstart example for using JSJunction:
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script language='javascript' type='text/javascript'
src='http://openjunction.github.com/JSJunction/json2.js'></script>
<script language='javascript' type='text/javascript'
src='http://openjunction.github.com/JSJunction/strophejs/1.0.1/strophe.js'></script>
<script language='javascript' type='text/javascript'
src='http://openjunction.github.com/JSJunction/junction/0.7.0/junction.js'></script>
<script type="text/javascript">
var activity = {ad:"my.test.app"};
var actor = {
onMessageReceived: function(msg) { alert("got a message: " + msg.text); }
, onActivityJoin: function() { alert("joined!"); this.sendMessageToSession({text: "first post!"}); }
};
JX.getInstance("prpl.stanford.edu").newJunction(activity,actor);
</script>
</head>
<body>
</body>
</html>