-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.html
executable file
·45 lines (31 loc) · 1.44 KB
/
start.html
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
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My Library</title>
<!-- dependencies -->
<script language="javascript" type="text/javascript" src="apps/flying-owl/static/js/jquery-1.9.1.js"></script>
<script language="javascript" type="text/javascript" src="apps/flying-owl/static/js/flying-owl.js"></script>
<script Content-Type="text/javascript">
// We would normally do an AJAX call to get the various data we need but due to Same Origin Policy issues
// with getting data from the file system (as will happen in this project almost always), we use a JSONP
// approach where the JSON files execute their data into existence using this dataCallback() function.
var dataCallback = function (returnData) {
var obj = returnData.value
var str = JSON.stringify(obj)
localStorage.setItem(returnData.key, str)
}
// Bootstrap the Flying OWL when everything has been loaded.
$(document).ready(function() {
$.flyingOwl.bootstrap()
})
</script>
<!--
Import topic database. We have to encapsulate the db in dataCallback for JSONP
to get around the restrictive origin policies for AJAX calls when using file protocol.
-->
<script language="javascript" type="text/javascript" src="apps/flying-owl/static/data/topics.json"></script>
</head>
<body>
<div id="message"> Loading topics and your library card... </div>
</body>
</html>