-
Notifications
You must be signed in to change notification settings - Fork 9
/
gobsprogram.html
69 lines (63 loc) · 1.37 KB
/
gobsprogram.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
<html>
<head>
<title>Gob's Program</title>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<style type="text/css">
body {
background-color:black;
}
p, span, .inputkeys, .penusArea {
color: green;
font-family: "Lucida Console";
display: inline;
}
.input {
width:500px;
}
.blink {
height: 15px;
width: 10px;
background-color: green;
display: inline;
animation: blink 1s steps(5, start) infinite;
-webkit-animation: blink 1s steps(5, start) infinite;
}
@keyframes blink {
to { visibility: hidden; }
}
@-webkit-keyframes blink {
to { visibility: hidden; }
}
</style>
</head>
<body>
<p>Gob's Program: Y/N?</p>
<div class="input">
<div style="float:left; display:inline;"><span class="q">?</span></div>
<div class="inputkeys"></div>
<div class="blink"></div>
</div>
<div class="penusArea"></div>
<script type="text/javascript">
var yPressed = 0;
$(document).keypress(function(eo) {
if (yPressed == 0) {
var char = String.fromCharCode(eo.which);
if (char == "Y") {
$(".inputkeys").text($(".inputkeys").text() + char);
yPressed = 1;
window.setInterval(Penus, 10)
}
else if (char == "N") {
$(".inputkeys").text($(".inputkeys").text() + char);
$(".penusArea").text("...what are you even doing?");
}
}
});
/* never thought i'd make this function */
function Penus() {
$(".penusArea").append("Penus ");
}
</script>
</body>
</html>