aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/nms.gathering.org/js/nms-info-box.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js
index 304a8d9..0481420 100644
--- a/web/nms.gathering.org/js/nms-info-box.js
+++ b/web/nms.gathering.org/js/nms-info-box.js
@@ -218,6 +218,7 @@ nmsInfoBox._windowTypes.switchInfo = {
return this.childContent;
},
showComments: function() {
+ var oldView = this.activeView;
this.activeView = "comments";
var domObj = document.createElement("div");
var comments = [];
@@ -232,10 +233,6 @@ nmsInfoBox._windowTypes.switchInfo = {
if(!nmsData.comments || !nmsData.comments.comments) {
this.commentsHash = false;
- // We have data, but its old, so don't change data
- } else if(this.commentsHash != false && this.commentsHash == nmsData.comments.hash) {
- return;
-
// We have data, refresh
} else if(nmsData.comments.comments[this.sw]) {
this.commentsHash = nmsData.comments.hash;
@@ -332,9 +329,14 @@ nmsInfoBox._windowTypes.switchInfo = {
nmsInfoBox.refresh();
},
unload: function() {
- this.childContent = false;
+ this.title = '';
+ this.content = '';
+ this.childContent = false;
+ this.sw = '';
+ this.swi = '';
+ this.swm = '';
this.commentsHash = false;
- this.activeView = "";
+ this.activeView = '';
},
save: function() {
var myData = nmsInfoBox._editStringify(this.sw);