mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-03 06:15:59 +00:00
Merge pull request #88 from DanWilkerson/master
Switched to $.getJSON for auto-parsing to fix versions reloading
This commit is contained in:
commit
1ac0d5206b
@ -8,19 +8,13 @@ var version = {
|
|||||||
*/
|
*/
|
||||||
version.checkVersion = function () {
|
version.checkVersion = function () {
|
||||||
|
|
||||||
$.ajax({
|
$.getJSON('controllers/hash.php')
|
||||||
type: 'GET',
|
.success(function(data) {
|
||||||
url: 'controllers/hash.php',
|
|
||||||
success: function (data) {
|
|
||||||
// The githash variable is located in index.php
|
// The githash variable is located in index.php
|
||||||
if (data && data.gitHash !== gitHash) {
|
if (data && data.gitHash !== gitHash) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
window.location.href = window.location.href;
|
window.location.href = window.location.href;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
error: function () {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user