diff options
author | piernov <piernov@piernov.org> | 2016-05-02 15:50:14 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2016-05-02 15:50:14 +0200 |
commit | f53549e4c2668ca268c8e31ef4c7cf3718fe08b5 (patch) | |
tree | 1a3f90cc7ab0c3b54ab991b814b787ec87f4dc6a | |
parent | 888afbab390f227bb89c98847b516897886df3d3 (diff) | |
download | candybox-f53549e4c2668ca268c8e31ef4c7cf3718fe08b5.tar.gz candybox-f53549e4c2668ca268c8e31ef4c7cf3718fe08b5.tar.bz2 candybox-f53549e4c2668ca268c8e31ef4c7cf3718fe08b5.tar.xz candybox-f53549e4c2668ca268c8e31ef4c7cf3718fe08b5.zip |
Move saveGame()/downGame() to its own JS file
-rw-r--r-- | index.xhtml | 1 | ||||
-rw-r--r-- | js/craftmine.js | 8 | ||||
-rw-r--r-- | js/savegame.js | 7 |
3 files changed, 8 insertions, 8 deletions
diff --git a/index.xhtml b/index.xhtml index d12585f..e879cf1 100644 --- a/index.xhtml +++ b/index.xhtml @@ -15,6 +15,7 @@ <script type="text/javascript" charset="utf-8" src="js/guild.js"></script> <script type="text/javascript" charset="utf-8" src="js/shop.js"></script> <script type="text/javascript" charset="utf-8" src="js/gui.js"></script> + <script type="text/javascript" charset="utf-8" src="js/savegame.js"></script> </head> <body onload="init()" onhashchange="changeTab()"> <div class="container-fluid"> diff --git a/js/craftmine.js b/js/craftmine.js index 13dd0a2..92fa45a 100644 --- a/js/craftmine.js +++ b/js/craftmine.js @@ -60,14 +60,6 @@ function updateMine() { updateData("mine"); } -function saveGame() { - sendRequest("craftmine.php", "op=saveGame"); -} - -function downGame() { - window.open("craftmine.php?op=downGame", "_blank"); -} - function init() { initCraftMine(); changeTab(); diff --git a/js/savegame.js b/js/savegame.js new file mode 100644 index 0000000..2a83f77 --- /dev/null +++ b/js/savegame.js @@ -0,0 +1,7 @@ +function saveGame() { + sendRequest("craftmine.php", "op=saveGame"); +} + +function downGame() { + window.open("craftmine.php?op=downSave", "_blank"); +} |