Fix: restructing sessionManager (incompleted)
This commit is contained in:
@@ -1,3 +1,114 @@
|
||||
function SessionStorageManager() {
|
||||
}
|
||||
|
||||
|
||||
SessionStorageManager.prototype.clear = function() {
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
SessionStorageManager.prototype.removeItem = function(key) {
|
||||
return sessionStorage.removeItem(key);
|
||||
}
|
||||
|
||||
|
||||
// maestro ID
|
||||
SessionStorageManager.prototype.setMaestroID = function(value) {
|
||||
sessionStorage.setItem("maestroID", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getMaestroID = function() {
|
||||
return sessionStorage.getItem("maestroID");
|
||||
}
|
||||
|
||||
// maestro account type
|
||||
SessionStorageManager.prototype.setMaestroAccountType = function(value) {
|
||||
sessionStorage.setItem("maestroAccountType", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getMaestroAccountType = function() {
|
||||
return sessionStorage.getItem("maestroAccountType");
|
||||
}
|
||||
|
||||
// player name
|
||||
SessionStorageManager.prototype.setPlayerName = function(value) {
|
||||
sessionStorage.setItem("playerName", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayerName = function() {
|
||||
return sessionStorage.getItem("playerName");
|
||||
}
|
||||
|
||||
// player player ID
|
||||
SessionStorageManager.prototype.setPlayerID = function(value) {
|
||||
sessionStorage.setItem("playerID", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayerID = function() {
|
||||
return sessionStorage.getItem("playerID");
|
||||
}
|
||||
|
||||
// player account type
|
||||
SessionStorageManager.prototype.setPlayerAccountType = function(value) {
|
||||
sessionStorage.setItem("playerAccountType", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayerAccountType = function() {
|
||||
return sessionStorage.getItem("playerAccountType");
|
||||
}
|
||||
|
||||
// playing app id
|
||||
SessionStorageManager.prototype.setPlayingAppID = function(value) {
|
||||
sessionStorage.setItem("playingAppID", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayingAppID = function() {
|
||||
return sessionStorage.getItem("playingAppID");
|
||||
}
|
||||
|
||||
// playing app name
|
||||
SessionStorageManager.prototype.setPlayingAppName = function(value) {
|
||||
sessionStorage.setItem("playingAppName", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayingAppName = function() {
|
||||
return sessionStorage.getItem("playingAppName");
|
||||
}
|
||||
|
||||
// playing app korean name
|
||||
SessionStorageManager.prototype.setPlayingAppKoreanName = function(value) {
|
||||
sessionStorage.setItem("playingAppKoreanName", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getPlayingAppKoreanName = function() {
|
||||
return sessionStorage.getItem("playingAppKoreanName");
|
||||
}
|
||||
|
||||
// record
|
||||
SessionStorageManager.prototype.setRecord = function(value) {
|
||||
sessionStorage.setItem("record", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getRecord = function() {
|
||||
return sessionStorage.getItem("record");
|
||||
}
|
||||
|
||||
// best record
|
||||
SessionStorageManager.prototype.setBestRecord = function(value) {
|
||||
sessionStorage.setItem("bestRecord", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getBestRecord = function() {
|
||||
return sessionStorage.getItem("bestRecord");
|
||||
}
|
||||
|
||||
// best record
|
||||
SessionStorageManager.prototype.setIsNewBestRecord = function(value) {
|
||||
sessionStorage.setItem("isNewBestRecord", value);
|
||||
}
|
||||
SessionStorageManager.prototype.getIsNewBestRecord = function() {
|
||||
return sessionStorage.getItem("isNewBestRecord");
|
||||
}
|
||||
|
||||
SessionStorageManager.prototype.resetPlayingAppData = function() {
|
||||
this.removeItem(playingAppID);
|
||||
this.removeItem(playingAppName);
|
||||
this.removeItem(playingAppKoreanName);
|
||||
this.removeItem(record);
|
||||
this.removeItem(bestRecord);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
class SessionStorageManager {
|
||||
|
||||
constructor() {
|
||||
@@ -108,4 +219,5 @@ class SessionStorageManager {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user