summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/save/read.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/save/read.html b/modules/save/read.html
index c359dd5..8ed703b 100644
--- a/modules/save/read.html
+++ b/modules/save/read.html
@@ -21,23 +21,23 @@ function populateList(arr){
var a=document.createElement("a");
a.appendChild(document.createTextNode(arr[i]));
a.href="javascript:void 0";
- a.addEventListener("click",(function(i,li){return function(){
+ a.addEventListener("click",(function(fname,li){return function(){
var xhr=new XMLHttpRequest();
xhr.onreadystatechange=function(){
if(xhr.readyState==4){
if(xhr.status!=200){
- alert("Error reading save '"+arr[i]+"'\n"+xhr.responseText);
+ alert("Error reading save '"+fname+"'\n"+xhr.responseText);
} else {
var l=ul.getElementsByClassName("selected");
for(var i=0;i<l.length;i++)l[i].classList.remove("selected");
li.classList.add("selected");
- displaySave(arr[i],xhr.responseText);
+ displaySave(fname,xhr.responseText);
}
}
};
- xhr.open("GET","/save/read/file/"+encodeURIComponent(arr[i]));
+ xhr.open("GET","/save/read/file/"+encodeURIComponent(fname));
xhr.send();
- };})(i,li));
+ };})(arr[i],li));
li.appendChild(a);
ul.appendChild(li);
}