lobby.app.redirect=function(path){window.location=lobby.app.url+path;};lobby.app.ar=function(fileName,data,callback){return lobby.ar(fileName,data,callback,lobby.app.id);};lobby.app.save=function(key,value,callback){var appID=lobby.app.id;var callback=typeof callback=="function"?callback:function(){};var requestURL=lobby.url+"/lobby/ar/app/"+appID+"/data/save";if(key==""||value==""){callback("bad");}else{$.post(requestURL,{"csrfToken":lobby.csrfToken,"key":key,"value":value},function(data){callback(data);}).error(function(){callback("bad");});}};lobby.app.remove=function(key,callback){var appID=lobby.app.id;var callback=typeof callback=="function"?callback:function(){};var requestURL=lobby.url+"/lobby/ar/app/"+appID+"/data/remove";if(key==""){callback("bad");}else{$.post(requestURL,{"key":key,"csrfToken":lobby.csrfToken},function(data){callback(data);}).error(function(){callback("bad");});}};
|