mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Sort of early start on roster page
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user