mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 12:39:45 +00:00
Switched to $.getJSON for auto-parsing to fix versions reloading
This commit is contained in:
parent
37e8d6bdc3
commit
515f4d10c3
@ -8,19 +8,13 @@ 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 () {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user