From 7f257757c229a7f90c81366e663ff1f6498f4620 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 5 Sep 2017 14:22:13 -0400 Subject: [PATCH] display username --- public/js/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index 192e422..b3c2f2c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -7,6 +7,8 @@ while(!username){ socket.emit('user joined', username); } +document.querySelector('h1').innerHTML = "Welcome, "+username; + socket.on('prompt sent', function (prompt) { if(prompt !== document.querySelector('dd').innerHTML){ button.removeAttribute("disabled");