-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (47 loc) · 2.71 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./index.css">
</head>
<body>
<p>This is an example used to connect into EventSub WebSockets</p>
<p><a href="" id="authorize">Authorize with Twitch</a></p>
<p><b>Scopes:</b></p>
<textarea id="scopes"></textarea>
<p><button onclick="updateAuthUrl()">Update Authorization URL with new scopes</button></p>
<hr>
<div id="connect">
<button onclick="autofillCLI()">Auto-fill URLs for Twitch CLI</button>
<button onclick="autofillProduction()">Auto-fill URLs for production</button><br><br>
<span><b>Websocket URL:</b> </span>
<input id="websocket-url" type="textbox" /><br>
<button onclick="connectWebsocket()" id="btnConnect">Connect</button> <button onclick="disconnectWebsocket()" id="btnClose" disabled="true">Close</button>
<p><b>Subscriptions</b></p>
<span><b>Subscription URL:</b> </span>
<input id="subscription-url" type="textbox" /><br>
<button onclick="premadeSub('channel.update')">channel.update</button>
<button onclick="premadeSub('channel.ban')">channel.ban</button>
<button onclick="premadeSub('channel.unban')">channel.unban</button>
<button onclick="premadeSub('channel.moderator.add')">channel.moderator.add</button><br>
<button onclick="premadeSub('channel.moderator.remove')">channel.moderator.remove</button>
<button onclick="premadeSub('channel.shield_mode.begin')">channel.shield_mode.begin</button>
<button onclick="premadeSub('channel.shield_mode.end')">channel.shield_mode.end</button><br>
<button onclick="premadeSub('stream.online')">stream.online</button>
<button onclick="premadeSub('stream.offline')">stream.offline</button>
<button onclick="premadeSub('user.update')">user.update</button>
<br>
<span>Payload</span><br>
<textarea id="subscriptions"></textarea><br>
<button onclick="subscribe()">Subscribe</button>
<br><br>
<button onclick="sendSpamText()">Send spam text message to server</button>
</div>
<hr>
<span><b>Log:</b></span> <button onclick="clearLog()">Clear</button>
<input type="checkbox" onclick="toggleHideKeepalive()" id="chkHideKeepalive" /> <span>Hide Keepalive messages</span>
<div id="log">
<span>Welcome</span><br>
</div>
<script type="text/javascript" src="./index.js"></script>
</body>
</html>