17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
var InputKeeper = {
|
|
storageKey: 'lastInput',
|
|
|
|
getInfo: function() {
|
|
return JSON.parse(Storage.getWithDefault(InputKeeper.storageKey, '{}'));
|
|
},
|
|
|
|
keep: function(key, value) {
|
|
var info = InputKeeper.getInfo();
|
|
info[key] = value;
|
|
Storage.set(InputKeeper.storageKey, info);
|
|
},
|
|
|
|
clean: function() {
|
|
Storage.set(InputKeeper.storageKey, '{}');
|
|
}
|
|
}; |