-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·49 lines (41 loc) · 1.31 KB
/
index.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
46
47
48
49
<!DOCTYPE html>
<html lang="pt">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Demo JsonFetcher</title>
<!-- INITIALIZE NAMESPACE -->
<script>var ns = {};</script>
</head>
<body></body>
<!-- VENDOR -->
<script src="js/vendor/reqwest.js"></script>
<script src="js/vendor/lscache.js"></script>
<!-- IMPL -->
<script src="js/http.js"></script>
<script src="js/local-storage.js"></script>
<script src="js/json-fetcher.js"></script>
<script src="js/i18n.js"></script>
<script>
ns.i18n.getMessages(function(messages) {
console.log('ns.i18n.getMessages: ', messages);
});
ns.i18n.getMessage('message', function(message) {
console.log('ns.i18n.getMessage: ', message);
});
ns.jsonFetcher.get('test.json', 2, function(response) {
console.log(response.message, 'test.json');
});
ns.jsonFetcher.get('test.json', 1, function(response) {
console.log(response.message, 'test.json');
});
ns.jsonFetcher.get('test.json?v=1', 1, function(response) {
console.log(response.message, 'test.json?v=1');
});
ns.jsonFetcher.get('test.json?v=2', 1, function(response) {
console.log(response.message, 'test.json?v=2');
});
/*
console.log('ns.storage.all: ', ns.storage.getAll());
*/
</script>
</html>