-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
36 lines (31 loc) · 1.16 KB
/
Copy pathindex.html
File metadata and controls
36 lines (31 loc) · 1.16 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
<!DOCTYPE html>
<head>
<title>BBC Ceefax in HTML5</title>
<link rel="stylesheet" type="text/css" href="index.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="ceefax.js"></script>
</head>
<body>
<center>
<div id="title">Ceefax.js</div>
<div id="subtitle">The Red Button is not a valid substitute!</div>
<canvas id="myCanvas" width="640" height="480"> <p>Come back when you've got a HTML5 enabled browser, buddy!</p> </canvas>
</center>
<script>
/* LIVE TEST DATA FROM NEWS FEED */
// Use BetaSignal to grab some test data:
$.getJSON('http://betasignal.com/api/1.0/json/clusters_callback.js?callback=?', {});
var betasignal_clusters = function( jsonData ) {
$.each(jsonData, function(i, article) {
Ceefax.Pages.push(new CeefaxPage(i, article.source, article.title, article.summary));
});
}
/*cheaply skirt the allow-origin issue
$.getJSON('dropbox.com/s/g49mib36rqbpv2v/testdata.json', function( data ) {
$.each(data, function(i, a) {
Ceefax.Pages.push(new CeefaxPage(a.page, a.category, a.headline, a.article));
});
});*/
Ceefax.run("myCanvas", 1000/30, 100);
</script>
</body>