Sort of early start on roster page

This commit is contained in:
Eric Fredricksen
2010-06-27 22:01:12 -07:00
parent 8a121c1f7c
commit ca2f9b30c3
3 changed files with 63 additions and 1 deletions
+19
View File
@@ -120,6 +120,25 @@ function GenerateName() {
}
function loadRoster() {
if (!window.localStorage) {
return;
} else {
var roster = window.localStorage.getItem("roster");
roster = roster ? JSON.parse(roster) : [];
//if (!$.isArray(roster))
// roster = [];
return roster;
}
}
function storeRoster(roster) {
window.localStorage.setItem("roster", JSON.stringify(roster));
}
function addToRoster(newguy) {
storeRoster(loadRoster().concat([newguy]));
}
var K = {};