changes "chess" to window.location.hostname for websocket server