Refresh player stats every 30 seconds

This commit is contained in:
Skylar Ittner 2019-05-05 19:02:57 -06:00
parent 50ca5a1c69
commit 1086bf6eee

View File

@ -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();
});
}