forked from Metapyziks/GOKZReplayViewer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.template.html
More file actions
101 lines (91 loc) · 3.64 KB
/
index.template.html
File metadata and controls
101 lines (91 loc) · 3.64 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Bhop Replay Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/base64-string.min.js"></script>
<script src="${BASEURL}/${RESOURCEDIR}/js/facepunch.webgame.js?v=${VERSION}"></script>
<script src="${BASEURL}/${RESOURCEDIR}/js/sourceutils.js?v=${VERSION}"></script>
<script src="${BASEURL}/${RESOURCEDIR}/js/replayviewer.js?v=${VERSION}"></script>
<link type="text/css" rel="stylesheet" href="${BASEURL}/${RESOURCEDIR}/styles/mapviewer.css?v=${VERSION}" />
<link type="text/css" rel="stylesheet" href="${BASEURL}/${RESOURCEDIR}/styles/replayviewer.css?v=${VERSION}" />
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #000;
color: #fff;
}
#title {
padding-left: 24px;
}
#map-view {
position: absolute;
top: 72px;
left: 16px;
right: 312px;
bottom: 16px;
background-color: black;
}
#replay-list {
position: absolute;
width: 256px;
right: 16px;
top: 72px;
bottom: 16px;
background-color: #111;
padding-left: 24px;
}
#replay-list a {
color: #bcf;
text-decoration: none;
}
</style>
</head>
<body>
<h2 id="title">Bhop Replay Viewer</h2>
<div id="map-view">
<script>
var viewer;
window.onload = function() {
viewer = new Bhop.ReplayViewer(document.getElementById("map-view"));
viewer.showDebugPanel = true;
viewer.mapBaseUrl = "${MAPSURL}";
viewer.replayLoaded.addListener(function(replay) {
var mins = Math.floor(replay.time / 60);
var secs = replay.time - (mins * 60);
var secsString = secs.toFixed(3);
var title = replay.playerName
+ " - " + replay.mapName
+ " - " + mins + ":" + (secsString.indexOf(".") === 1 ? "0" : "") + secsString
+ " Style: " + replay.style
+ ". Track: " + replay.track;
document.getElementById("title").innerText = title;
document.title = title;
});
var searchParams = new URLSearchParams(window.location.search);
var replayUrl = searchParams.get("replay");
if (replayUrl != null) {
viewer.isPlaying = true;
viewer.loadReplay(decodeURIComponent(replayUrl));
viewer.animate();
} else {
viewer.showMessage("No replay URL provided");
}
}
</script>
</div>
<div id="replay-list">
<h2>bhop_easy_csgo</h2>
<ul>
<li><a href="">makmak - 31.3125</a></li>
<li><a href="">makmak - 31.3125</a></li>
</ul>
<h2>bhop_easy_csgo</h2>
<ul>
<li><a href="">makmak - 31.3125</a></li>
<li><a href="">makmak - 31.3125</a></li>
</ul>
</div>
</body>
</html>