bludit/bl-plugins/version/js/version.js
David Blake 3c37da3f47 Update \bludit\bl-plugins\version\js\version.js
Prevent the Version plugin from hiding the current version on screen when a new version is available as this is not helpful.
2019-11-02 22:20:32 +00:00

23 lines
651 B
JavaScript

function getLatestVersion() {
console.log("[INFO] [PLUGIN VERSION] Getting list of versions of Bludit.");
$.ajax({
url: "https://version.bludit.com",
method: "GET",
dataType: 'json',
success: function(json) {
// Constant BLUDIT_BUILD is defined on variables.js
if (json.stable.build > BLUDIT_BUILD) {
//$("#current-version").hide(); //Uncomment if you want to hide the current version when a new version is available, but this is unhelpful.
$("#new-version").show();
}
},
error: function(json) {
console.log("[WARN] [PLUGIN VERSION] There is some issue to get the version status.");
}
});
}
getLatestVersion();