aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/craftmine.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/craftmine.js b/js/craftmine.js
index bbb1074..46c726a 100644
--- a/js/craftmine.js
+++ b/js/craftmine.js
@@ -24,6 +24,11 @@ function updateData() {
}
}
+function debitAccount(amount) {
+ data.gold -= amount;
+ updateData("gold");
+}
+
function withdrawMine() {
sendRequest("craftmine.php", "op=withdrawMine&amount="+data.mine, function(xhr) {
var gold = parseInt(xhr.responseText); // Server's response is a string