This repository was archived by the owner on Jul 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
58 lines (49 loc) · 1.63 KB
/
Copy pathtest.html
File metadata and controls
58 lines (49 loc) · 1.63 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html>
<head>
<title>Dev Feed</title>
<script src="jquery.js"></script>
<script src="underscore.js"></script>
<script src="autobahn.min.js"></script>
<script>
$(function() {
var server = 'ws://localhost:9000',
session = null;
ab.connect(server,
function(sess) {
session = sess;
session.prefix("nerds", "http://example.com/");
session.subscribe("nerds:github", onEvent);
console.log('connected');
},
function(code, reason) {
console.log(code + " " + reason);
}
);
function onEvent(uri, e) {
console.log(uri);
console.log(e);
}
function createRow(type, data) {
var tpl = $('#' + type).html(),
rendered = _.template(tpl, data);
return $('<div class="row"></div>').html(rendered);
}
});
</script>
</head>
<body>
<div id="feed">
</div>
<!-- various templates -->
<script id="github" type="text/template">
<%= username %> commited something.
</script>
<script id="trello" type="text/template">
</script>
<script id="jenkins" type="text/template">
</script>
<script id="jira" type="text/template">
</script>
</body>
</html>