add small code tweaks

This commit is contained in:
Gabriele Cirulli
2014-03-12 12:15:57 +01:00
parent 39ebf51ce2
commit b080e5300d
4 changed files with 13 additions and 12 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
window.fakeStorage = {
_data : {},
setItem : function (id, val) {
console.log('set');
console.log("set");
return this._data[id] = String(val);
},
getItem : function (id) {
@@ -13,8 +13,9 @@ window.fakeStorage = {
function LocalScoreManager() {
var localSupported = !!window.localStorage;
this.key = 'bestScore';
this.storage = localSupported ? window.localStorage : window.fakeStorage;
this.key = "bestScore";
this.storage = localSupported ? window.localStorage : window.fakeStorage;
}
LocalScoreManager.prototype.get = function () {