Refresh player stats every 30 seconds
This commit is contained in:
parent
50ca5a1c69
commit
1086bf6eee
@ -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();
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user