-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
82 lines (80 loc) · 2.75 KB
/
index.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="select-css.css" />
<title>Buzzer Mainframe</title>
</head>
<body>
<div class="layout">
<a class="login-link" style="display: none" href="">Login</a>
<div class="control-panel" style="display: none">
<div class="buzz-queue">
<div class="buzz-list">
<h1>Buzzer List</h1>
<ol></ol>
</div>
<button name="random" disabled>Random</button>
<button name="clear" disabled>Clear</button>
</div>
<div class="buzz-controls">
<button name="mode" disabled>Mode</button>
<p id="mode">-</p>
<button name="ready" disabled>✔</button>
<p id="ready">-</p>
</div>
<div class="buzz-servers" hidden>
<select name="servers" id="servers" class="select-css">
<option value="">Choose a server</option>
</select>
</div>
<div class="buzz-channels" hidden>
<select name="channels" id="channels" class="select-css"></select>
<button name="channelSelect" id="channelSelect" disabled>
Listen
</button>
</div>
</div>
<a
class="bot-link"
style="display: grid; text-align: center"
target="_blank"
href=""
>Add 🤖 to Server</a
>
<a class="logout-link" style="display: none" href="">Logout</a>
<a
class="donate-with-crypto"
href="https://commerce.coinbase.com/checkout/d8d6ea55-26f6-4901-a2f5-e164f239e058"
>
Donate with Crypto (Coinbase)
</a>
</div>
<script src="node_modules/socket.io/client-dist/socket.io.js"></script>
<script src="client.js"></script>
<script>
window.onload = () => {
const sessionId = localStorage.getItem("sessionId");
if (sessionId) {
authorize(sessionId);
} else {
const fragment = new URLSearchParams(window.location.search.slice(1));
if (fragment.has("code")) {
document.querySelector(".logout-link").style.display = "block";
login({
code: fragment.get("code"),
redirect_uri:
window.location.protocol + "//" + window.location.host,
});
} else {
document.querySelector(".login-link").style.display = " block";
}
}
};
</script>
</body>
</html>