move version checking code into its own folder and file

This commit is contained in:
Jon Heller
2015-10-19 01:22:00 -04:00
parent e35c9e9fc5
commit 07ec697e2c
3 changed files with 33 additions and 15 deletions

View File

@@ -45,21 +45,7 @@ jQuery(document).ready(function($) {
// }
// });
(function checkVersion()
{
$.getJSON('githash.php', {}, function(json, textStatus) {
if (json) {
if (json.gitHash != gitHash) {
window.location.reload();
window.location.href=window.location.href;
}
}
});
setTimeout(function() {
checkVersion();
}, 3000);
})();
version.init();
time.init();