diff options
-rw-r--r-- | index.xhtml | 2 | ||||
-rw-r--r-- | js/craftmine.js | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/index.xhtml b/index.xhtml index aa29615..d12585f 100644 --- a/index.xhtml +++ b/index.xhtml @@ -32,6 +32,8 @@ <form class="form-horizontal" method="post" action="craftmine.php"> <button class="btn btn-default" type="button" name="withdraw" onclick="withdrawMine()">Withdraw</button> <button class="btn btn-default" type="button" name="HireMiner" onclick="hireMiner()">Hire one miner</button> + <button class="btn btn-default" type="button" onclick="saveGame()">Save game</button> + <button class="btn btn-default" type="button" onclick="downGame()">Download game</button> </form> </div> </div> diff --git a/js/craftmine.js b/js/craftmine.js index 92fa45a..13dd0a2 100644 --- a/js/craftmine.js +++ b/js/craftmine.js @@ -60,6 +60,14 @@ function updateMine() { updateData("mine"); } +function saveGame() { + sendRequest("craftmine.php", "op=saveGame"); +} + +function downGame() { + window.open("craftmine.php?op=downGame", "_blank"); +} + function init() { initCraftMine(); changeTab(); |