Light12306/RwTicketAssistantV2/app/air/js/util/InputKeeper.js
iFish addcafcdf8 + 集成扩展的源码
+ 增加相关TypedScript的导入
2014-08-08 14:33:43 +08:00

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, '{}');
}
};