aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/craftmine.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/js/craftmine.js b/js/craftmine.js
index 50d3a47..6cd2065 100644
--- a/js/craftmine.js
+++ b/js/craftmine.js
@@ -1,4 +1,4 @@
-datas = {
+data = {
gold: 0,
mine: 0,
miners: 1,
@@ -18,31 +18,31 @@ function sendRequest(url, params, callback) {
}
-function updateDatas(t) {
- document.getElementById(t).innerHTML = datas[t];
+function updateData(t) {
+ document.getElementById(t).innerHTML = data[t];
}
function withdrawMine() {
sendRequest("craftmine.php", "op=withdrawMine", function() {
- datas.gold += parseInt(datas.mine);
- datas.mine = 0;
- updateDatas("gold");
- updateDatas("mine");
+ data.gold += parseInt(data.mine);
+ data.mine = 0;
+ updateData("gold");
+ updateData("mine");
})
}
function initCraftMine() {
sendRequest("craftmine.php", "op=getCraftMine", function(xhr) {
var ret = xhr.responseText;
- datas.gold = ret;
- updateDatas("gold");
+ data.gold = ret;
+ updateData("gold");
})
}
function updateMine() {
- datas.mine += (datas.miners+1);
- updateDatas("mine");
+ data.mine += (data.miners+1);
+ updateData("mine");
}
function init() {