-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcemoji.html
More file actions
62 lines (56 loc) · 1.11 KB
/
mcemoji.html
File metadata and controls
62 lines (56 loc) · 1.11 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>letters 2 bedrock emojis converter</title>
<style>
body { font-family: sans-serif; padding: 20px; }
textarea { width: 100%; height: 120px; font-size: 16px; }
.output { margin-top: 15px; padding: 10px; background: #eee; font-size: 28px; white-space: pre-wrap; }
</style>
</head>
<body>
<h2>convert lowercase letters to bedrock edition emojis</h2>
<textarea id="inp" placeholder="type..."></textarea>
<div id="out" class="output"></div>
<script>
const map = {
a:"\uE100",
b:"\uE101",
c:"\uE102",
d:"\uE103",
e:"\uE0A0",
f:"\uE0A1",
g:"\uE104",
h:"\uE080",
i:"\uE081",
j:"\uE082",
k:"\uE083",
l:"\uE084",
m:"\uE085",
n:"\uE086",
o:"\uE087",
p:"\uE000",
q:"\uE001",
r:"\uE002",
s:"\uE003",
t:"\uE004",
u:"\uE005",
v:"\uE006",
w:"\uE007",
x:"\uE008",
y:"\uE009",
z:"\uE00A"
};
function convert(t) {
t = t.toLowerCase();
let out = "";
for (let c of t) out += map[c] || c;
return out;
}
document.getElementById("inp").addEventListener("input", () => {
document.getElementById("out").textContent = convert(document.getElementById("inp").value);
});
</script>
</body>
</html>