Skip to content

Commit

Permalink
Demo: use location.hostname for a proper hostname detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Mar 7, 2011
1 parent da4a0a1 commit 827a7ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions demo/index.html
Expand Up @@ -8,8 +8,7 @@


<script type="text/javascript"> <script type="text/javascript">
function init() { function init() {
var h = location.host.split(":")[0]; socket = new io.Socket(location.hostname);
socket = new io.Socket(h);
socket.on('message', function(data){ socket.on('message', function(data){
console.log(data); console.log(data);
}); });
Expand Down

0 comments on commit 827a7ca

Please sign in to comment.