diff options
author | piernov <piernov@piernov.org> | 2016-05-07 13:40:16 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2016-05-07 13:40:16 +0200 |
commit | 80f5826d1ac8f6d42866d5133c6f463943b96bab (patch) | |
tree | 1bfccff31d9be66bb9b791ed6dd942f638c32df9 /js/craftmine.js | |
parent | 79cfbb29042fd60dfbc76a6810f75cce21d3ffe0 (diff) | |
parent | ec7771705d62d09fcd142c87f4941604f31c1d76 (diff) | |
download | candybox-80f5826d1ac8f6d42866d5133c6f463943b96bab.tar.gz candybox-80f5826d1ac8f6d42866d5133c6f463943b96bab.tar.bz2 candybox-80f5826d1ac8f6d42866d5133c6f463943b96bab.tar.xz candybox-80f5826d1ac8f6d42866d5133c6f463943b96bab.zip |
Merge branch 'feat/savegame' into alexichi
Diffstat (limited to 'js/craftmine.js')
-rw-r--r-- | js/craftmine.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/craftmine.js b/js/craftmine.js index 70becec..b87f946 100644 --- a/js/craftmine.js +++ b/js/craftmine.js @@ -9,10 +9,10 @@ data = { icon : "H" } -function sendRequest(url, params, callback) { +function sendRequest(url, params, callback, isFile) { var xhr = new XMLHttpRequest(); xhr.open("POST", url); - xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + if(!isFile) xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == "200") { var data = ""; @@ -81,5 +81,6 @@ function updateMine() { function init() { initCraftMine(); changeTab(); + listSaves(); window.setInterval(updateMine, 1000); } |