-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathto_export.html
36 lines (32 loc) · 1.08 KB
/
to_export.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
<html>
<head>
<script type="text/javascript">
var SCRIPTS = ["Estrela","Constelacao","Canvas","application"];
function bindJsScript(path_or_script,isScript){
var script = document.createElement("script");
script.type = "text/javascript";
if(isScript===undefined) script.src = path_or_script;
else script.text = path_or_script;
document.body.appendChild(script);
}
function bindLink(path){
var link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
link.href = path;
document.head.appendChild(link);
}
function loadScriptsDinamically() {
var path = document.location.search.slice(1);
for(var i in SCRIPTS){
bindJsScript(path + "javascript/"+SCRIPTS[i]+".js");
}
bindLink(path + "css/style.css");
setTimeout(function(){bindJsScript("init();",true)},500);
}
</script>
</head>
<body onload="loadScriptsDinamically()">
<canvas id="estrelas" width="400" height="400"></canvas>
</body>
</html>