bludit/bl-plugins/version/js/version.js

23 lines
541 B
JavaScript
Raw Permalink Normal View History

function getLatestVersion() {
2018-07-02 00:24:53 +02:00
console.log("[INFO] [PLUGIN VERSION] Getting list of versions of Bludit.");
$.ajax({
url: "https://version.bludit.com",
method: "GET",
dataType: 'json',
success: function(json) {
2018-07-02 00:24:53 +02:00
// Constant BLUDIT_BUILD is defined on variables.js
if (json.stable.build > BLUDIT_BUILD) {
$("#current-version").hide();
$("#new-version").show();
}
},
error: function(json) {
2018-07-02 00:24:53 +02:00
console.log("[WARN] [PLUGIN VERSION] There is some issue to get the version status.");
}
});
}
getLatestVersion();