Partial support for fast and loose games

This commit is contained in:
Eric Fredricksen
2010-07-07 11:20:31 -07:00
parent b42ae65fa2
commit a6a29c78ab
3 changed files with 10 additions and 10 deletions
+7 -4
View File
@@ -160,13 +160,16 @@ function loadRoster() {
}
function storeRoster(roster) {
window.localStorage.setItem("roster", JSON.stringify(roster));
if (window.localStorage)
window.localStorage.setItem("roster", JSON.stringify(roster));
}
function addToRoster(newguy) {
var r = loadRoster();
r[newguy.name] = newguy;
storeRoster(r);
if (window.localStorage) {
var r = loadRoster();
r[newguy.name] = newguy;
storeRoster(r);
}
}
var K = {};
+2 -5
View File
@@ -58,8 +58,6 @@ a.x, a.sheet {
blockquote {
margin: 0 10% 0 10%;
background-color: #ffd;
border: solid 1px #fdb;
padding: 1ex;
font-size: 11pt;
}
@@ -78,9 +76,8 @@ blockquote {
In the olden times you'd <a href="download.php">download</a> Progress
Quest to your computer; now you may instead play Progress Quest
directly in your browser. Most modern browsers will save your game(s)
on this page <i>in just this browser</i>; if not, you can play fast and loose: the game will last
as long as the page stays open. Online leader boards and character
storage are not implemented at this time.
on this page, in this browser. Online leader boards and server-side
game saves are not implemented at this time.
</blockquote>
<p id=roster>
+1 -1
View File
@@ -8,7 +8,7 @@ $(document).ready(function () {
games = loadRoster();
if (!games) {
roster.text("Err...no local storage");
roster.html("<b>This browser does not support local storage. You may still play fast and loose: the game will last only as long as the page stays open in your browser.");
return;
}
$.each(games, function (key, c) {