aboutsummaryrefslogtreecommitdiffhomepage
path: root/minecraft
diff options
context:
space:
mode:
Diffstat (limited to 'minecraft')
-rw-r--r--minecraft/index.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/minecraft/index.html b/minecraft/index.html
index 1e082b9..9a5abab 100644
--- a/minecraft/index.html
+++ b/minecraft/index.html
@@ -12,6 +12,22 @@
12 <title>Minecraft server list</title> 12 <title>Minecraft server list</title>
13 </head> 13 </head>
14 14
15 <script>
16 function add2whitelist() {
17 username = document.getElementById("username").value;
18 button = document.getElementById("add-button");
19 fetch("https://mc.igorek.dev/whitelist", {
20 method: "POST",
21 body: username,
22 }).then((response) => {
23 response.text().then((text) => {
24 button.textContent = `[${text}]`;
25 setTimeout(() => (button.textContent = "[+ add]"), 2000);
26 });
27 });
28 }
29 </script>
30
15 <body> 31 <body>
16 <pre style="font-size: clamp(0.25em, 1.5vw, 0.75em)"> 32 <pre style="font-size: clamp(0.25em, 1.5vw, 0.75em)">
17 33
@@ -42,6 +58,7 @@
42 Version: <a href="https://minecraft.wiki/w/Java_Edition_1.20.4">1.20.4</a> 58 Version: <a href="https://minecraft.wiki/w/Java_Edition_1.20.4">1.20.4</a>
43 Map: <a href="https://mc.igorek.dev">https://mc.igorek.dev</a> 59 Map: <a href="https://mc.igorek.dev">https://mc.igorek.dev</a>
44 IP: <span class="copy" copy-text="mc.igorek.dev:25565">mc.igorek.dev:25565</span> 60 IP: <span class="copy" copy-text="mc.igorek.dev:25565">mc.igorek.dev:25565</span>
61 Whitelist: <input type="text" id="username" placeholder="username"> <span id="add-button" class="add" onclick="add2whitelist()">[+ add]</span>
45 Recommended mods: <a href="https://modrinth.com/plugin/simple-voice-chat">Simple Voice Chat</a> 62 Recommended mods: <a href="https://modrinth.com/plugin/simple-voice-chat">Simple Voice Chat</a>
46 </pre> 63 </pre>
47 <pre> 64 <pre>