diff --git a/www/js/home.js b/www/js/home.js index 62efeb1..4b0d123 100644 --- a/www/js/home.js +++ b/www/js/home.js @@ -18,6 +18,16 @@ function loadHomePage(callback) { initChat(); refreshChat(); setInterval(refreshChat, 1000 * 15); + // Refresh health bar + setInterval(function () { + callAPI("getprofile", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password") + }, function (data) { + playerProfile = data.profile; + setupProfile(); + }); + }, 1000 * 30); callback(); }); }