Skip to content

Commit aa58fea

Browse files
committed
Cleaning up JavaScript
1 parent e64b747 commit aa58fea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

websocket/chat/src/main/webapp/websocket.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* holder.
3939
*/
4040

41-
var wsUri = "ws://" + document.location.host + document.location.pathname + "websocket";
41+
var wsUri = "ws://" + document.location.host + document.location.pathname + "chat";
4242
var websocket = new WebSocket(wsUri);
4343

4444
var username;
@@ -61,8 +61,7 @@ function onOpen() {
6161
}
6262

6363
function onMessage(evt) {
64-
console.log("onMessage");
65-
writeToScreen("RECEIVED: " + evt.data);
64+
console.log("onMessage: " + evt.data);
6665
if (evt.data.indexOf("joined") != -1) {
6766
userField.innerHTML += evt.data.substring(0, evt.data.indexOf(" joined")) + "\n";
6867
} else {

0 commit comments

Comments
 (0)