diff --git a/examples/server/public_simplechat/simplechat.js b/examples/server/public_simplechat/simplechat.js index 6b25b73bc..bfd048c5f 100644 --- a/examples/server/public_simplechat/simplechat.js +++ b/examples/server/public_simplechat/simplechat.js @@ -78,14 +78,18 @@ class SimpleChat { this.iLastSys = -1; } + ods_key() { + return `SimpleChat-${this.chatId}` + } + save() { /** @type {SimpleChatODS} */ let ods = {iLastSys: this.iLastSys, xchat: this.xchat}; - localStorage.setItem(this.chatId, JSON.stringify(ods)); + localStorage.setItem(this.ods_key(), JSON.stringify(ods)); } load() { - let sods = localStorage.getItem(this.chatId); + let sods = localStorage.getItem(this.ods_key()); if (sods == null) { return; }