-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstacdn.html
More file actions
51 lines (51 loc) · 1.76 KB
/
Copy pathinstacdn.html
File metadata and controls
51 lines (51 loc) · 1.76 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>InstaCDN Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<script type="text/javascript">
/*
* This weirdness allows us to handle loading both from
* the filesystem, and through the tornado parser.
*/
window.DEBUG = true;
function getUrl(str) {
if (str.indexOf("{" + "{") != 0) return str;
return str.match(/\"(.*)\"/)[1];
}
var styles = ['{{ static_url("css/bootstrap.css") }}',
'{{ static_url("css/webp2p.css") }}'];
for (var i = 0; i < styles.length; i++) {
var url = getUrl(styles[i]);
document.write("<link href='" + url + "' rel='stylesheet'>");
}
var scripts = [
'{{ static_url("js/instacdn_connection.js") }}',
'{{ static_url("js/instacdn_peer.js") }}',
'{{ static_url("js/instacdn.js") }}'
];
for (var i = 0; i < scripts.length; i++) {
var url = getUrl(scripts[i]);
document.write('<script type="text/javascript" src="' + url + '">');
document.write('<' + '/script>');
}
</script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<header class="jumbotron subhead">
<h1>InstaCDN Demo</h1>
</header>
<section id="image">
<img instacdn-src="static/img/test.png"/>
</section>
</div>
</body>
<!-- WebP2P WebRTC-like interface -->
<iframe src='chrome-extension://mmcjdiamabhnpbchjgoapfnbcfmaodpm/load.html#localhost:8080'></iframe>
</html>