-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (50 loc) · 1.61 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
<html>
<head>
<title>Minecraft Utilities</title>
<link rel="icon" href="assets/redstone.png" type="image/png">
<link rel="stylesheet" href="general.css">
</head>
<body background="assets/World Background.jpg">
<div id="bar">
<h1>Select a World</h1>
<hr>
<h3>Select a world to use this functionalities</h3>
<br>
<div id="logged-user">
<h3>User:</h3>
<h3 id="logged-name">User Name</h3>
<button class="mcb-green" onclick="setuser()">Switch</button>
</div>
</div>
<div id="WorldSect">
<div>
<img src="assets/grass.png" style="width: 50px;">
<h3>World Name</h3>
</div>
<center>
<input class="mcb-green" type="text" placeholder="My-World" id="World-Name">
<button class="mcb-green" onclick="joinWorld()">Access</button>
<br>
<p>Dont use spaces</p>
</center>
</div>
<script>
var userName = localStorage.getItem("user");
if (userName == undefined) {
setuser();
} else {
document.getElementById("logged-name").innerHTML = userName;
}
function joinWorld() {
worldName = document.getElementById("World-Name").value;
if (!worldName == "") {
localStorage.setItem("world", worldName);
window.location = "worldboard.html";
}
}
function setuser() {
window.location = "login.html";
}
</script>
</body>
</html>