23 lines
459 B
JavaScript
23 lines
459 B
JavaScript
|
|
||
|
function getLatestVersion() {
|
||
|
|
||
|
$("#current-version").show();
|
||
|
|
||
|
$.ajax({
|
||
|
url: "https://version.bludit.com",
|
||
|
method: "GET",
|
||
|
dataType: 'json',
|
||
|
success: function(json) {
|
||
|
// Constant BLUDIT_BUILD is defined on functions.js
|
||
|
if (json.stable.build > BLUDIT_BUILD) {
|
||
|
$("#current-version").hide();
|
||
|
$("#new-version").show();
|
||
|
}
|
||
|
},
|
||
|
error: function(json) {
|
||
|
console.log("Error when try to get the version.");
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
getLatestVersion();
|