-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (63 loc) · 2.82 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Biodigital human</title>
<script type="text/javascript" src="//cdn.jsdelivr.net/gh/S4-NetQuest/biodigital-select-activity@latest/js/cdn-check.js"></script>
<script type="text/javascript" src="//developer.biodigital.com/builds/api/2/human-api.min.js"></script>
</head>
<body>
<iframe id="myWidget" src="" width="100%" height="100%"></iframe>
<script>
function checkCDN() {
//window.jsdelivrUp is set if/when cdn-check.js loads
if(!window.jsdelivrUp) {
loadLocal();
}
else {
loadCDN();
}
}
function loadLocal() {
console.log("########### loading local scripts ###########");
var script1 = document.createElement("script");
script1.type = "text/javascript";
document.head.appendChild(script1);
script1.src = "js/babel-polyfill.min.js";
var script2 = document.createElement("script");
script2.onload = function() {
var script3 = document.createElement("script");
document.head.appendChild(script3);
script3.src = "js/main.js";
}
document.head.appendChild(script2);
script2.src = "js/player.js";
var c = document.createElement("link");
document.head.appendChild(c);
c.rel = "stylesheet"
c.href = "css/style.css"
}
function loadCDN() {
console.log("########### loading CDN scripts ###########");
var script1 = document.createElement("script");
script1.type = "text/javascript";
document.head.appendChild(script1);
script1.src = "//cdn.jsdelivr.net/gh/S4-NetQuest/biodigital-select-activity@latest/js/babel-polyfill.min.js";
var script2 = document.createElement("script");
script2.onload = function() {
var script3 = document.createElement("script");
document.head.appendChild(script3);
script3.src = "//cdn.jsdelivr.net/gh/S4-NetQuest/biodigital-select-activity@latest/js/main.js";
}
document.head.appendChild(script2);
script2.src = "//cdn.jsdelivr.net/gh/S4-NetQuest/biodigital-select-activity@latest/js/player.js";
var c = document.createElement("link");
document.head.appendChild(c);
c.rel = "stylesheet"
c.href = "//cdn.jsdelivr.net/gh/S4-NetQuest/biodigital-select-activity@latest/css/style.css"
}
window.biodigitalDevKey = "fd252fc4534de5f8d9351de899e6b88f9198bd4c";
checkCDN();
</script>
</body>
</html>