adding  removing javascript of websocket