-
Notifications
You must be signed in to change notification settings - Fork 1
/
echo.html
188 lines (149 loc) · 6.52 KB
/
echo.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity no-cssanimations csscolumns cssgradients no-cssreflections csstransforms no-csstransforms3d csstransitions fontface video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="en"><!--<![endif]--><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><style type="text/css"></style>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>WebSocket.org | Echo Test</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" type="image/png" href="http://websocket.org/img/favicon.png">
<!-- CSS : implied media="all" -->
<link rel="stylesheet" href="echo_fichiers/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="echo_fichiers/ga.js" async="" type="text/javascript"></script><script src="echo_fichiers/modernizr-1.js"></script>
<!-- For navbar menu -->
<!--[if lte IE 7]>
<style type="text/css">
#menu ul {display:inline;}
#ntl-menu ul {filter: alpha(opacity=95); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95);}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<div class="clearfix"></div>
<br>
<script type="text/javascript" src="echo_fichiers/stuff.js"></script>
<script language="javascript" type="text/javascript">
function browserDetect()
{
document.getElementById("browserType").innerHTML = BrowserDetect.browser + ' ' + BrowserDetect.version;
document.getElementById("platform").innerHTML = BrowserDetect.OS;
if (window.WebSocket)
{
document.getElementById("wsSupportImg").src = "img/check.png"
}
else
{
document.getElementById("wsSupportImg").src = "img/cross.png"
}
}
// Handle difference for IE.
if (window.attachEvent)
{
window.attachEvent("load", browserDetect)
}
else
{
window.addEventListener("load", browserDetect, false);
}
</script>
<div id="main-container">
<!--
<header>
This is the header.
</header>
-->
<div id="main">
<h3>Try it out</h3>
<div style="display: block;" id="webSocketSupp">
<div style="float: left;">
<img src="echo_fichiers/check.png" align="absmiddle" height="20" width="20">
</div>
<div style="float: left; width: 600px; margin-left: 10px; position:relative; top: 8px;">
This browser supports WebSocket.
</div>
<div class="clearfix"></div>
</div>
<div id="noWebSocketSupp">
<div style="float: left;">
<img src="echo_fichiers/cross.png" align="absmiddle" height="36" width="36">
</div>
<div style="float: left; width: 600px; margin-left: 10px;">
<p>Uh-oh, the browser you're using doesn't have native support for WebSocket. That means you can't run this demo.</p>
<p>The following link lists the browsers that support WebSocket:</p>
<p><a href="http://caniuse.com/#feat=websockets">http://caniuse.com/#feat=websockets</a></p>
</div>
<div class="clearfix"></div>
</div>
<div id="echo">
<div id="echo-config" style="float: left;">
<strong>Location:</strong><br>
<input value="ws://localhost:8080/game" id="wsUri" size="35">
<br>
<button id="connect">Connect</button>
<button disabled="disabled" id="disconnect">Disconnect</button>
<br>
<br>
<strong>Message:</strong><br>
<textarea disabled="disabled" id="sendMessage1" rows="5">
{
"msg" : "Hello",
"pseudo" : "playerA",
"time" : HOUR
}
</textarea>
<br>
<button disabled="disabled" id="send1" class="wsButton">Send</button>
<br>
<br>
<strong>Message:</strong><br>
<textarea disabled="disabled" id="sendMessage2" rows="5">
{
"msg" : "Hello",
"pseudo" : "playerB",
"time" : HOUR
}
</textarea>
<br>
<button disabled="disabled" id="send2" class="wsButton">Send</button>
<br>
<br>
<strong>Message:</strong><br>
<textarea disabled="disabled" id="sendMessage3" rows="5">
{
"msg" : "Bouge",
"raquette" : 20,
"time" : HOUR
}
</textarea>
<br>
<button disabled="disabled" id="send3" class="wsButton">Send</button>
</div>
<div id="echo-log" style="float: left; margin-left: 20px; padding-left: 20px; width: 350px; height: 50px; border-left: solid 1px #cccccc;"> <strong>Log:</strong>
<div id="consoleLog"></div>
<button id="clearLogBut" style="position: relative; top: 3px;">Clear log</button>
</div>
<div class="clearfix"></div>
</div>
<!-- Javascript at the bottom for fast page loading -->
<!--[if lt IE 7 ]>
<script src="js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
<script type="text/javascript" src="echo_fichiers/echo.js"></script>
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="echo_fichiers/jquery.htm"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.4.2.js"%3E%3C/script%3E'))</script><script src="echo_fichiers/jquery-1.js"></script>
</body></html>