2018-03-06 23:50:31 +01:00
|
|
|
|
|
|
|
function getLatestVersion() {
|
|
|
|
|
2018-07-02 00:24:53 +02:00
|
|
|
console.log("[INFO] [PLUGIN VERSION] Getting list of versions of Bludit.");
|
2018-03-06 23:50:31 +01:00
|
|
|
|
|
|
|
$.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
|
2018-03-06 23:50:31 +01:00
|
|
|
if (json.stable.build > BLUDIT_BUILD) {
|
2019-11-02 23:20:32 +01:00
|
|
|
//$("#current-version").hide(); //Uncomment if you want to hide the current version when a new version is available, but this is unhelpful.
|
2018-03-06 23:50:31 +01:00
|
|
|
$("#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.");
|
2018-03-06 23:50:31 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getLatestVersion();
|