Permalink
Browse files

Demo: use location.hostname for a proper hostname detection.

  • Loading branch information...
yrashk committed Mar 7, 2011
1 parent da4a0a1 commit 827a7cae66721d973ea244dcd45964623b03977f
Showing with 1 addition and 2 deletions.
  1. +1 −2 demo/index.html
View
@@ -8,8 +8,7 @@
<script type="text/javascript">
function init() {
- var h = location.host.split(":")[0];
- socket = new io.Socket(h);
+ socket = new io.Socket(location.hostname);
socket.on('message', function(data){
console.log(data);
});

0 comments on commit 827a7ca

Please sign in to comment.