Merge pull request #88 from DanWilkerson/master

Switched to $.getJSON for auto-parsing to fix versions reloading
This commit is contained in:
Michael Teeuw 2016-02-16 09:09:25 +01:00
commit 1ac0d5206b

View File

@ -8,20 +8,14 @@ var version = {
*/
version.checkVersion = function () {
$.ajax({
type: 'GET',
url: 'controllers/hash.php',
success: function (data) {
$.getJSON('controllers/hash.php')
.success(function(data) {
// The githash variable is located in index.php
if (data && data.gitHash !== gitHash) {
window.location.reload();
window.location.href = window.location.href;
}
},
error: function () {
}
});
}
});
}