-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
110 lines (96 loc) · 2.73 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
<!DOCTYPE html>
<html>
<title>mc seed convert thing</title>
<style>
@font-face {
font-family: mc;
src: url('https://lawrencfgsdfg.github.io/mc-seed-convert/Minecraftia.ttf');
}
* {
font-family: mc;
color: white;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-size:16px;
}
input::selection {
color: blue;
background-color: rgba(255,255,255,.99);
}
p {display: inline-block;}
input {
display: inline-block;
padding-top: 12px;
border: 2px;
font-size: 16px;
background: black;
border-style: solid;
border-color: darkgray;
border-radius: 0px;
height: 16px;
width: 300px;
padding-left: 8px;
outline-width: 0;
}
.toggle {
padding-left: 4px;
padding-right: 2px;
height: 24px;
border: 2px;
border-style: solid;
border-color: darkgray;
background: black;
width: 100px;
}
body {background-image: url(https://raw.githubusercontent.com/lawrencfgsdfg/mc-seed-convert/main/dirt.png);}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>
<body>
<center>
<p style="font-size:24px;">Minecraft Seed Converter</p><br>
<p>Input Seed:</p>
<input type="number" id="seed" onkeyup="convert()" value="12345" >
<br>
<p>Convert to: </p><p id="toggle" onclick="dothing(); convert();" class="toggle">Java</p>
<div id="out">
<p>Converted Seed:</p>
<input readonly id="seed2" value="zoop">
</div>
</center>
</body>
<script>
var x = document.getElementById("toggle");
function dothing() {
if (x.innerHTML === "Bedrock") {
x.innerHTML = "Java";
} else if (x.innerHTML === "Java") {
x.innerHTML = "Bedrock";
}
}
function convert(){
theseed = document.getElementById("seed2")
pee = document.getElementById("seed").value
zooped = "bruh"; theseed.style.color = "red";
if (x.innerHTML === "Bedrock") {
if (pee <= 4294967296 && pee > 2147483648) { zooped = parseInt(pee) - 4294967296; theseed.style.color = "white";}
if (pee <= 2147483648) { zooped = pee; theseed.style.color = "white";}
if (pee < 0) { zooped = "couldn't convert"; theseed.style.color = "red";}
if (pee > 4294967296) { zooped = "couldn't convert"; theseed.style.color = "red";}
} else if (x.innerHTML === "Java") {
if (pee < 0) { zooped = parseInt(pee) + 4294967296; theseed.style.color = "white";}
if (pee > 0) { zooped = pee; theseed.style.color = "white";}
if (pee > 2147483648) { zooped = "not even a valid bedrock seed"; theseed.style.color = "red";}
if (pee < -2147483648) { zooped = "not even a valid bedrock seed"; theseed.style.color = "red";}
}
document.getElementById("seed2").value = zooped;
}
</script>
</html>