Modified websocket.js