Replace jquery usage with native functions

This commit is contained in:
Andrei Andreev 2019-10-28 18:09:09 +03:00
parent b5b336043e
commit 6275575358
4 changed files with 8 additions and 6 deletions

View File

@ -68,7 +68,7 @@ function saveToPlayFab(root) {
TitleId: titleId,
PlayFabId: playFabId,
// convert array into object with numbers as keys
Data: $.extend({}, chunks)
Data: chunks.mapToObject((_, index) => index, value => value)
}
try {
PlayFab.ClientApi.UpdateUserData(requestData, saveToPlayFabCallback);

View File

@ -218,11 +218,13 @@ function gainedInfinities() {
setInterval(() => {
if (isLocalEnvironment()) return;
$.getJSON("version.txt", data => {
if (data.version > player.version) {
Modal.message.show(data.message, updateRefresh);
}
});
fetch("version.txt")
.then(response => response.json())
.then(json => {
if (json.version > player.version) {
Modal.message.show(json.message, updateRefresh);
}
});
}, 60000);
// TODO: remove before release

0
response.json()) Normal file
View File

0
{ Normal file
View File