-
Notifications
You must be signed in to change notification settings - Fork 8
/
replays.html~
90 lines (74 loc) · 3.25 KB
/
replays.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>
<!-- Title, so we can keep track of what page this is, even if
PhoneGap doesn't display it. -->
<title>VirPong Mobile Client: Gameplay</title>
<!-- Defining the size of the viewport. This is useful for -->
<!-- mobile devices for the sake of scaling and disabling resizing. -->
<meta name="viewport"
content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no;"
charset="utf-8" />
<!-- Defining our main styles. "main.css" is basic stuff, -->
<!-- and the two others provide sizing relativity for the iPad -->
<!-- and Android respectively. Also, we have gameplay.css, -->
<!-- which contains the styling for the game board. -->
<link rel="stylesheet" href="css/main.css" type="text/css" />
<link rel="stylesheet" href="css/gameplay.css" type="text/css" />
<link rel="stylesheet" media="only screen and (device-width: 768px)"
href="css/ipad.css" type="text/css" />
<link rel="stylesheet" media="only screen and (device-width: 800px)"
href="css/android.css" type="text/css" />
<link rel="stylesheet" media="only screen and (device-width: 320px)"
href="css/iphone.css" type="text/css" />
<link rel="stylesheet" media="only screen and (device-width: 480px)"
href="css/iphone.css" type="text/css" />
<!-- Include PhoneGap, Socket.IO, and our pong.js -->
<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0-android.js"></script>
<script type="text/javascript" charset="utf-8" src="http://10.150.1.204:3000/socket.io/socket.io.js"></script>
<script type="text/javascript" charset="utf-8" src="pong.js"></script>
<!-- Some JS for this page -->
<script type="text/javascript">
/*
* This function takes an event and disables the default behavior.
* @param event e The event we're preventing the behavior of.
*/
function preventBehavior(e)
{
e.preventDefault();
}
/*
* When the body element loads, create an event listener
* to fire off function "onDeviceReady" when the device
* reports ready.
*/
function onBodyLoad()
{
document.addEventListener("deviceready", onDeviceReady, false);
};
/*
* This gets fired off when the device reports ready.
*/
function onDeviceReady()
{
// Grab the device's local store and point to it with
// localStorage.
var localStorage = window.localStorage;
// Add the listener for a touch move so that we can disable its
// behavior.
//document.addEventListener("touchmove", preventBehavior, false);
}
</script>
</head>
<!-- When body element loads, call "onBodyLoad()" -->
<body onload="onBodyLoad();">
<!-- Our nice little menu at the top, with a link back to the main menu. -->
<div id="topBar">
<a class="topBarButton" href="index.html">Main Menu</a>
</div>
<!-- Our game canvas. We grab the id with JS to use with JS. -->
<!-- So no attributes are really needed here. -->
<div id="view"></div>
</body>
</html>