-
Notifications
You must be signed in to change notification settings - Fork 0
/
rxmarbles.html
58 lines (43 loc) · 1.38 KB
/
rxmarbles.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>RxMarbles</title>
<style>
html, body {
height: 95%;
font-family: "Courier New",sans-serif;
}
.container {
position: relative;
top: 50%;
transform: translateY(-50%);
}
</style>
</head>
<body>
<div class="container"></div>
<script src="js/jquery.min.js"></script>
<!-- RxMarbles embed code -->
<!-- see https://github.com/staltz/rxmarbles/releases/tag/v1.3.1 -->
<script src="lib/js/rxmarbles/element.js"></script>
<script src="lib/js/rxmarbles/CustomElements.min.js"></script>
<script>
$(function() {
var type = queryParameters().type || 'map';
$('.container').append('<rx-marbles key="' + type + '">');
});
function queryParameters() {
var result = {};
var params = window.location.search.split(/\?|\&/);
params.forEach( function(it) {
if (it) {
var param = it.split("=");
result[param[0]] = param[1];
}
});
return result;
}
</script>
</body>
</html>