-
Notifications
You must be signed in to change notification settings - Fork 0
/
ghost-translator.html
90 lines (73 loc) · 2.36 KB
/
ghost-translator.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ghost-translator 👻</title>
<link rel="icon" type="image/png" href="./favicon.png">
<script src="./ghost-translator.js"></script>
<style>
html,body,input,textarea {
background-color: #060606;
color: #fff;
font-size: x-large;
}
#buttons {
width: 100%;
}
input[type="button"] {
border: 1px solid white;
padding: 10px;
border-radius: 20px;
}
input.translateBtn {
width: 50%;
}
a,a:visited {
color: #888;
text-decoration: none;
}
#mainDiv {
width: 75%;
margin: auto;
margin-top: 100px;
}
#inputArea, #outputArea {
padding: 20px;
border: 1px solid white;
border-radius: 20px;
}
#inputArea {
height: 200px;
width: 100%;
box-sizing: border-box;
}
#copyButton {
display: none;
}
#footer {
float: right;
}
@media all and (max-width: 1000px) {
#mainDiv {
width: 100%;
margin: auto;
}
}
</style>
</head>
<body>
<div id="mainDiv">
<h1>ghost-translator 👻</h1>
<textarea id="inputArea" placeholder="Enter some text..."></textarea><br /><br />
<div id="buttons">
<input type="button" class="translateBtn" value="To ghost 👻" onclick="document.getElementById('outputArea').innerText = encodeGhost(document.getElementById('inputArea').value);" /><input type="button" class="translateBtn" value="To human 🧑🏼" onclick="document.getElementById('outputArea').innerText = decodeGhost(document.getElementById('inputArea').value)" />
</div><br />
<div id="outputArea">Results will appear here!</div><br />
<input type="button" id="copyButton" name="copyButton" value="Copy results" onclick="copyText();" />
<div id="footer">
<a href="https://github.com/xdpirate/ghost-translator" target="_blank">Source code</a>
</div>
</div>
</body>
</html>