-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
167 lines (147 loc) · 7.39 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
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
160
161
162
163
164
165
166
167
<!doctype html>
<html lang=”ja”>
<head>
<title>Presence Changer</title>
<meta charse=”utf8″/>
<style>
ul {
padding: 0px 0px ;
}
li {
list-style: none;
display: inline-block;
min-height: 2em;
}
li ul li{
list-style: none;
display: list-item;
}
</style>
<script>
function Reset() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/reset', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send();
}
function StateUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/State', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+State.value);
}
function DetailsUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/Details', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+Details.value);
}
function Large_ImageUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/Large_Image', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+Large_Image.value);
}
function Large_TextUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/Large_Text', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+Large_Text.value);
}
function Small_ImageUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/Small_Image', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+Small_Image.value);
}
function Small_TextUpdate() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/Small_Text', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+Small_Text.value);
}
function EnableButton() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/buttons/button/True', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send();
}
function DisableButton() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/buttons/button/False', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send();
}
function button1_label_Update() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/button1_label', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+button1_label.value);
}
function button1_url_Update() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/button1_url', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+button1_url.value);
}
function button2_label_Update() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/button2_label', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+button2_label.value);
}
function button2_url_Update() {
xhr = new XMLHttpRequest();
xhr.open('POST', '/update/main/button1_url', true);
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send("value="+button2_url.value);
}
</script>
</head></html>
<body>
<h1>Presence Changer</h1>
<p><input type="button" value="タイマーをリセット" onclick="Reset();"/></p>
<ul>
<li>
<ul>
<li>State</li>
<li>Details</li>
<li>Large_Image</li>
<li>Large_Text</li>
<li>Small_Image</li>
<li>Small_Text</li>
</ul>
</li>
<li>
<ul>
<li><input type="text" value="" id="State"><input type="submit" onclick="StateUpdate();" value="送信"></li>
<li><input type="text" value="" id="Details"><input type="submit" onclick="DetailsUpdate();" value="送信"></li>
<li><input type="text" value="" id="Large_Image"><input type="submit" onclick="Large_ImageUpdate();" value="送信"></li>
<li><input type="text" value="" id="Large_Text"><input type="submit" onclick="Large_TextUpdate();" value="送信"></li>
<li><input type="text" value="" id="Small_Image"><input type="submit" onclick="Small_ImageUpdate();" value="送信"></li>
<li><input type="text" value="" id="Small_Text"><input type="submit" onclick="Small_TextUpdate();" value="送信"></li>
</ul>
</li>
</ul>
<p><input type="button" value="ボタンを有効化" onclick="EnableButton();"/><input type="button" value="ボタンを無効化" onclick="DisableButton();"/></p>
<ul>
<li>
<ul>
<li>button1_label</li>
<li>button1_url</li>
<li>button2_label</li>
<li>button2_url</li>
</ul>
</li>
<li>
<ul>
<li><input type="text" value="" id="button1_label"><input type="submit" onclick="button1_label_Update();" value="送信"></li>
<li><input type="url" value="" id="button1_url"><input type="submit" onclick="button1_url_Update();" value="送信"></li>
<li><input type="text" value="" id="button2_label"><input type="submit" onclick="button2_label_Update();" value="送信"></li>
<li><input type="url" value="" id="button2_url"><input type="submit" onclick="button2_url_Update();" value="送信"></li>
</ul>
</li>
</ul>
<a href="http://discord.com/developers/applications/{{clientid}}/rich-presence/assets" target="_blank" rel="noopener noreferrer">画像設定画面</a>
</body>
</html>