-
Notifications
You must be signed in to change notification settings - Fork 0
/
mobile.html
44 lines (43 loc) · 1.45 KB
/
mobile.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
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<link href="style_mobile.css" rel="stylesheet">
</head>
<body>
<div id="position_display_slider"></div>
<div id="control">
<button id="play"></button>
<div id="position_display_precise"></div>
<div class="label_slider">Position:</div>
<div id="position_slider">
</div>
<div class="label_slider">Speed:</div>
<div id="speed_slider">
<div id="speed_display" class="ui-slider-handle">100%</div>
</div>
</div>
<object id="main_svg" type="image/svg+xml"></object>
<audio id="music" preload="auto"></audio>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TweenMax.min.js"></script>
<script src="CustomEase.min.js"></script>
<script src="snap.svg-min.js"></script>
<script src="svg_animate.js"></script>
<script src="basketball_animate_mobile.js"></script>
<script id="animation"></script>
<script>
{
const url_argument = location.hash.slice(1);
if (/[^\w,.]/.test(url_argument)) {
throw "animation ids may only contain letters, numbers, and underscores";
}
const animation = url_argument.split(",")[0] ?? null;
if (animation === null || animation.length === 0) {
throw "empty animation id";
}
document.querySelector("#animation").src = "animation/" + animation + ".js";
}
</script>
</body>
</html>