aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-04-23 17:01:12 +0200
committerpiernov <piernov@piernov.org>2016-04-23 17:04:31 +0200
commit446ac1001ec02bd55cd73cf6906d2681bd9e7b79 (patch)
tree0f05c43245b47759236f2a57b7f771ed0271bc0b /js
parent8b3612fce76d3d331acc7384c04bbfc83fd26470 (diff)
downloadcandybox-446ac1001ec02bd55cd73cf6906d2681bd9e7b79.tar.gz
candybox-446ac1001ec02bd55cd73cf6906d2681bd9e7b79.tar.bz2
candybox-446ac1001ec02bd55cd73cf6906d2681bd9e7b79.tar.xz
candybox-446ac1001ec02bd55cd73cf6906d2681bd9e7b79.zip
Spelling mistake: datas→data
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() {