forked from quisquous/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manual_dps_test.html
44 lines (41 loc) · 1.24 KB
/
manual_dps_test.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
<html>
<head>
<style>
button {
font-family: Tahoma,Verdana;
font-size: 14px;
margin: 10px;
display: block;
}
</style>
<script src="fake_dps.js"></script>
<script type="text/javascript">
function raf() {
var e = generateDpsEvent();
postDpsMessage(e);
}
window.setInterval(raf, 1000);
function postDpsMessage(message) {
var iframe = document.getElementById("dps");
iframe.contentWindow.postMessage(message, "*");
}
function startPhase(name) {
postDpsMessage(generateStartPhaseEvent(name));
}
function endPhase(name) {
postDpsMessage(generateEndPhaseEvent(name));
}
</script>
</head>
<body>
<iframe id="dps" width="800px" height="500px" src="xephero-cactbot.html"></iframe>
<button type="button" onclick="resetDps()">Reset DPS</button>
<button type="button" onclick="startPhase('P1')">Start P1</button>
<button type="button" onclick="endPhase('P1')">End P1</button>
<button type="button" onclick="startPhase('P2')">Start P2</button>
<button type="button" onclick="endPhase('P2')">End P2</button>
<button type="button" onclick="startPhase('B')">Start B</button>
<button type="button" onclick="endPhase('B')">End B</button>
<button type="button" onclick="addCombatant()">Add Combatant</button>
</body>
</html>