-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
47 lines (47 loc) · 1.51 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
<html>
<head>
<title>bigclicker</title>
<!-- mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='apple-mobile-web-app-status-bar-style' content='black-translucent' />
<style>
body {
margin:0;
padding:0;
font-family:'Courier', Arial, sans-serif;
}
a {
background:url(anim.gif) no-repeat;
background-position:center;
display:inline-block;
position:relative;
width:50%;
height:100%;
float:left;
}
a#a {
-webkit-transform:rotate(180deg);
}
</style>
<script src="/socket.io/socket.io.js"></script>
</head>
<body>
<a id='a' href='#a'></a>
<a id='b' href='#b'></a>
<script>
var socket = io.connect('{abs}');
function go(dir) {
return function(e) {
socket.emit('send', { dir: dir });
e.stopPropagation();
e.preventDefault();
}
}
var a = document.getElementById('a'),
b = document.getElementById('b');
b.onclick = go(1);
a.onclick = go(-1);
</script>
</body>
</html>