diff --git a/app/Bootstrap/HttpServer.js b/app/Bootstrap/HttpServer.js index e74a46a..a882887 100755 --- a/app/Bootstrap/HttpServer.js +++ b/app/Bootstrap/HttpServer.js @@ -43,11 +43,6 @@ function (http, nodeStatic, Api) { console.checkpoint('HTTP Server serves index'); break; - case req.url == '/game.html': - fileServer.serveFile('./static/html/game.html', 200, {}, req, res); - console.checkpoint('HTTP Server serves game'); - break; - case req.url == '/client.js': fileServer.serveFile('./client.js', 200, {}, req, res); break; diff --git a/app/Game/Client/GameObjects/Doll.js b/app/Game/Client/GameObjects/Doll.js index 288513c..aff54de 100755 --- a/app/Game/Client/GameObjects/Doll.js +++ b/app/Game/Client/GameObjects/Doll.js @@ -36,7 +36,6 @@ function (Parent, Settings, Nc, Exception) { Doll.prototype.setActionState = function(state, force) { if(!force && this.actionState == state) return; - console.log(state) if(!state) throw new Exception("action state is undefined"); diff --git a/static/js/menu.js b/static/js/menu.js index 789e5c5..9b8882e 100644 --- a/static/js/menu.js +++ b/static/js/menu.js @@ -3,6 +3,9 @@ if(!Chuck) var Chuck = {}; window.onhashchange = function() { if(window.location.hash) { + if($("#game").style.display == "block") { + window.location.reload(); + } refresh(function(list) { var channelName = unescape(window.location.hash.substr(1)); if(channelExists(list, channelName)) { @@ -148,6 +151,7 @@ if(!Chuck) var Chuck = {}; function quickstart() { refresh(function(list){ var defaultChannelName = "Dungeon"; + history.pushState("", document.title, window.location.pathname + "#" + defaultChannelName); var nickname = $("#nick").value; if(!nickname) { @@ -250,7 +254,6 @@ if(!Chuck) var Chuck = {}; } function join(nickname, channelName) { - if(validateForJoin(nickname, channelName)) { localStorage["player"] = JSON.stringify({ nickname: nickname @@ -314,6 +317,7 @@ if(!Chuck) var Chuck = {}; var refreshInterval = setInterval(refresh, 5000); Chuck.menu = { - show: show + show: show, + quickstart: quickstart } })(Chuck); \ No newline at end of file