Move to navigation library for URL handling without ports.

This commit is contained in:
Gareth Latty
2016-07-26 22:50:06 +01:00
parent a9fa2e7cc8
commit 5785b29313
8 changed files with 61 additions and 17 deletions
-2
View File
@@ -26,9 +26,7 @@ function start(url, version) {
game.ports.existingGame.subscribe(function (gameCodeAndSecret) {
if (gameCodeAndSecret != null) {
localStorage.setItem("existing-game", JSON.stringify(gameCodeAndSecret))
window.history.replaceState(null, "", "/#" + gameCodeAndSecret.gameCode);
} else {
window.history.replaceState(null, "", "/");
localStorage.removeItem("existing-game");
}
});