-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (60 loc) · 1.21 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
<!-- usage copy in the dir of your scripts -->
<!-- usage dir/index.html : generate lauch list links -->
<!-- or dir/index.html?script (no.js) -->
<!-- or dir/?script (no.js) -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>EasyWebGL</title>
<meta charset="utf-8">
<style>
body
{
margin:40px;
background-color: black;
color:white;
font-size: larger;
}
a,h1 {color:white;}
a:focus {color:yellow;}
</style>
</head>
<body id="body_list_js">
<h1>Demos</h1>
</body>
<script>
// Mettez ici la liste de vos scripts:
liste_js = ["antoine", "color_map"];
let bo = document.getElementById("body_list_js")
let launcher = "";
if ("ontouchstart" in window)
{
launcher = "launch_tactile.html?";
msg = "Tactile device detected";
}
else
{
launcher = "launch.html?";
msg = "Desktop device detected";
}
let fjs = window.location.href.split('?');
if (fjs.length>1)
{
window.location.href = launcher+fjs.slice(1);
}
else
{
let p = document.createElement("P");
p.innerText = msg;
bo.appendChild(p);
liste_js.forEach(d =>
{
let anch = document.createElement("A");
anch.href =launcher+d;
anch.innerText = d
bo.appendChild(anch);
bo.appendChild(document.createElement("BR"))
});
}
</script>
</html>