/*
Wow my visitor code is still being used I'm surprised it's still around at this point
*/
var visitors;
var user = encodeURI(getUserId());
getKeyValue("visitors",function(value){
if(value == undefined){
setKeyValue("visitors",{users: {}, length: 0, ran: 0},function(){visitors = {users: {}, length: 0, ran: 0}; addVisitor()});
} else {visitors = value; addVisitor();}
});
function addVisitor(){
if(!(user in visitors.users)){
visitors.users[user] = visitors.length;
visitors.length++;
}
visitors.ran++;
console.log("the number of peeps that have played this is "+visitors.length+" so far! and it has been played "+visitors.ran+" time(s)!");
setKeyValue("visitors",visitors);
}