From 692b24631dec76ed6adc784776e6c797208cf184 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Mon, 1 Oct 2012 01:26:18 -0500 Subject: Challenges now update automatically upon completion (without needing to refresh) --- js/mapspecs.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/mapspecs.js') diff --git a/js/mapspecs.js b/js/mapspecs.js index 30a8ec7..c15e3af 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -294,6 +294,17 @@ function request_path_done() { animatePath(JO.path[i].path, mapid, JO.path[i].start, i); } mapdata[JO.mapid].pathsPending = i; + + //Mark off challenges + if(isChallenge) + { + for(var i = 0; i < JO.completedChallenges.length; i++) + { + var challengeId = JO.completedChallenges[i]; + document.getElementById("challenge_id_" + challengeId).className = "challenge_complete"; + } + } + } function decryptJSON(text) { -- cgit v1.2.3