-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
79 lines (68 loc) · 2.42 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
<html>
<head>
<title>rot8000.com</title>
<style type="text/css">
body {
background-color: white;
font-family: Sans-Serif;
text-align: center;
}
h1 {
margin-bottom: 0.1em;
}
h2 {
font-size: 1em;
font-weight: normal;
margin: 0 auto 5em auto;
}
.arrow {
font-size: 2.0em;
font-weight: bold;
margin: 0;
}
.warning {
background-color: orange;
padding: 0.4em 0.75em;
}
#permalink, #reverseperm {
visibility: hidden;
}
</style>
<script type="text/javascript" src="rot8000.js"></script>
<script type="text/javascript">
var rotator = new rot8000();
function checkquery() {
if (window.location.search) {
document.getElementById('enteredText').value = decodeURIComponent(window.location.search.slice(1));
}
update();
}
function keyclick() {
if (window.location.search) {
window.history.pushState({}, document.title, window.location.href.split('?')[0]);
}
update();
}
function update() {
var original = document.getElementById('enteredText').value;
var rotated = rotator.rotate(original);
document.getElementById('output').innerHTML = rotated;
if (original) {
document.getElementById("permalink").style.visibility = "visible";
document.getElementById("permalink").href = "/index?" + original;
document.getElementById("reverseperm").style.visibility = "visible";
document.getElementById("reverseperm").href = "/index?" + rotated;
}
}
</script>
</head>
<body onload="checkquery()">
<h1>rot8000.com</h1>
<h2><a href="/info">about rot8000</a></h2>
<noscript><p><span class="warning"><em>Please enable JavaScript to use this page.</em></span></p></noscript>
<p><textarea id="enteredText" cols="80" rows="12" maxlength="10000" onkeyup="keyclick()" onchange="keyclick()" autofocus></textarea></p>
<p class="arrow">↓</p>
<p><textarea id="output" cols="80" rows="12" readonly></textarea></p>
<p><a id="permalink">permalink</a> <a id="reverseperm">reverse permalink</a></p>
</body>
</html>