From 50ba68efc7290e572bde2e7e33829b2077e996c1 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Mon, 1 Apr 2013 18:02:54 -0400 Subject: logout stuff --- public/js/auth.js | 1 + public/js/draw.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'public/js') diff --git a/public/js/auth.js b/public/js/auth.js index 0297ddd..9450509 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -37,6 +37,7 @@ var Auth = { Chat.join(); }, logout: function(){ + delete localStorage['nick']; $("#login").show(); } } diff --git a/public/js/draw.js b/public/js/draw.js index b15416b..3e91a16 100644 --- a/public/js/draw.js +++ b/public/js/draw.js @@ -28,7 +28,9 @@ $(function(){ drawing = false; lastpoint = null; } - $("#chat-message").focus(); + if (Game.nick) { + $("#chat-message").focus(); + } }); $(window).on("drawing:start", function(){ offset = $(workspace).offset(); -- cgit v1.2.3-70-g09d2