Way too much effort improving no localStorage version

This commit is contained in:
Eric Fredricksen
2010-07-07 14:41:52 -07:00
parent 75fe19ddb4
commit 897b0a82a4
3 changed files with 50 additions and 27 deletions
+8 -2
View File
@@ -6,12 +6,18 @@ $(document).ready(function () {
var roster = $("#roster");
roster.empty();
if (!storage) {
if (!window.localStorage) {
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;
}
games = loadRoster() || {};
games = loadRoster();
$.each(games, function (key, c) {
if (!c.Traits) {
delete games[key];
return;
}
var name = c.Traits.Name;
var br = brag(c);