forked from TeasOfficial/ShavitTimerReplayViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.template.html
More file actions
159 lines (146 loc) · 5.42 KB
/
index.template.html
File metadata and controls
159 lines (146 loc) · 5.42 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!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="${RESOURCEDIR}/js/facepunch.webgame.js?v=${VERSION}"></script>
<script src="${RESOURCEDIR}/js/sourceutils.js?v=${VERSION}"></script>
<script src="${RESOURCEDIR}/js/replayviewer.js?v=${VERSION}"></script>
<link type="text/css" rel="stylesheet" href="${RESOURCEDIR}/styles/mapviewer.css?v=${VERSION}" />
<link type="text/css" rel="stylesheet" href="${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;
padding-right: 24px;
overflow: scroll;
padding-bottom: 15px;
font-size: 14px;
}
#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 = `[U:1:${replay.steamid}]`
+ " - " + 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>Teas Official</h2>
<div>
<b>支持的插件:</b>
<div>
<a href="https://github.com/shavitush/bhoptimer">
shavitush/bhoptimer
</a>
</div>
<div>
<a href="https://github.com/bhopppp/Shavit-Surf-Timer">
bhopppp/Shavit-Surf-Timer
</a>
</div>
</div>
<hr>
<h2>GitHub 预览</h2>
<div>
<h3>短图:</h3>
<ol>
<li>
<a href="?replay=./replays/bhop_bfur.replay">bhop_bfur - 9.829</a>
</li>
<li>
<a href="?replay=./replays/surf_anoobis.replay">(V11) surf_anoobis - 1:54.303</a>
</li>
<li>
<a href="?replay=./replays/surf_anoobis_v10.replay">(V10) surf_anoobis - 43.131</a>
</li>
<li>
<a href="?replay=./replays/surf_anoobis_s1.replay">(V10) surf_anoobis - Stage 1</a>
</li>
<li>
<a href="?replay=./replays/surf_anoobis_s2.replay">(V10) surf_anoobis - Stage 2</a>
</li>
<li>
<a href="?replay=./replays/surf_anoobis_s3.replay">(V10) surf_anoobis - Stage 3</a>
</li>
</ol>
<h3>长图:</h3>
<ol>
<li>
<a href="?replay=./replays/bhop_enlightened.replay">bhop_enlightened - 4:46.129</a>
</li>
</ol>
</div>
<hr>
<a href="https://github.com/TeasOfficial/shavittimerreplayviewer" target="_blank">GitHub</a>
<br><br>
<div>
<b>注意:</b>
<span>
<br>
Bhop: 100Tick
<br>
Surf: 66Tick
<br>
Tickrate设置不正确会导致回放文件错乱,如有需求请到 replayviewer.js 文件中修改,截止最新版本,相关行数为:589。
<br><br>
开源网站,禁止倒卖
</span>
</div>
</div>
</body>
</html>