From 2b0a84a41eeb90094d42c3c516bf99837d08a745 Mon Sep 17 00:00:00 2001 From: piernov Date: Wed, 27 Apr 2016 19:47:34 +0200 Subject: Automatically show received info --- js/craftmine.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/craftmine.js b/js/craftmine.js index 92fa45a..28583dd 100644 --- a/js/craftmine.js +++ b/js/craftmine.js @@ -12,6 +12,8 @@ function sendRequest(url, params, callback) { xhr.onreadystatechange = function() { if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == "200") { var data = JSON.parse(xhr.responseText); + if(data.info) + showInfo(data.info); if(data.error) { showError(data.error); return; -- cgit v1.2.3-70-g09d2