mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Partial support for fast and loose games
This commit is contained in:
@@ -160,14 +160,17 @@ function loadRoster() {
|
||||
}
|
||||
|
||||
function storeRoster(roster) {
|
||||
if (window.localStorage)
|
||||
window.localStorage.setItem("roster", JSON.stringify(roster));
|
||||
}
|
||||
|
||||
function addToRoster(newguy) {
|
||||
if (window.localStorage) {
|
||||
var r = loadRoster();
|
||||
r[newguy.name] = newguy;
|
||||
storeRoster(r);
|
||||
}
|
||||
}
|
||||
|
||||
var K = {};
|
||||
|
||||
|
||||
+2
-5
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user