+// Generated by CoffeeScript 1.3.3
(function() {
Readings.Config = (function() {
this.opts = opts;
}
+ Config.prototype.key = function(name) {
+ return "config." + name;
+ };
+
Config.prototype.get = function(name) {
+ var v;
+ v = localStorage.getItem(this.key(name));
+ if (v != null) {
+ return JSON.parse(v);
+ }
return this.opts[name];
};
+ Config.prototype.save = function(name, value) {
+ return localStorage.setItem(this.key(name), JSON.stringify(value));
+ };
+
return Config;
})();