From 3b5d11ed921f8f6cc4ecbdb0f5988f4ca588cb60 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 8 May 2019 15:08:44 +0200 Subject: save: Fix deleting non-last file --- modules/save/read.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/save/read.html') 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