forked from Zolmeister/zethos
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
48 lines (44 loc) · 1.48 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
<!doctype html>
<html>
<head>
<title>Zethos - By Zolmeister</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico">
<style>
html, body { margin: 0; padding: 0; border: 0; }
#c { display: block; } /* kill scrollbars from hell */
</style>
</head>
<body>
WPM <input id="wpm" value="400" >
<canvas id="c"></canvas>
<script>
var a = document.getElementsByTagName('canvas')[0];
var b = document.body;
var d = function(e){ return function(){ e.parentNode.removeChild(e); }; }(a);
// unprefix some popular vendor prefixed things (but stick to their original name)
var AudioContext =
window.AudioContext ||
window.webkitAudioContext;
var requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(f){ setTimeout(f, 1000/30); };
// stretch canvas to screen size (once, wont onresize!)
a.style.width = (a.width = innerWidth) + 'px';
a.style.height = (a.height = innerHeight) + 'px';
var c = a.getContext('2d');
WPM = 400;
document.addEventListener('DOMContentLoaded', function() {
var el_wpm = document.getElementById('wpm');
el_wpm.addEventListener('blur', function(e) {
WPM = parseInt(el_wpm.value, 10);
});
});
</script>
<script src='main.mod.js'>
</script>
</body>
</html>