diff --git a/githash.php b/githash.php
new file mode 100644
index 00000000..9a839edf
--- /dev/null
+++ b/githash.php
@@ -0,0 +1,2 @@
+trim(`git rev-parse HEAD`)));
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 00000000..40949129
--- /dev/null
+++ b/index.php
@@ -0,0 +1,24 @@
+
+
+ Magic Mirror
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/main.js b/js/main.js
index 2f7cb659..156ef886 100644
--- a/js/main.js
+++ b/js/main.js
@@ -24,6 +24,23 @@ jQuery(document).ready(function($) {
var news = [];
var newsIndex = 0;
+ (function checkVersion()
+ {
+ $.getJSON('githash.php', {}, function(json, textStatus) {
+ if (json) {
+ if (json.gitHash != gitHash) {
+ console.log('refresh');
+ location.reload();
+ } else {
+ console.log('up to date');
+ }
+ }
+ });
+ setTimeout(function() {
+ checkVersion();
+ }, 3000);
+ })();
+
(function updateTime()
{
var now = new Date();
@@ -95,7 +112,6 @@ jQuery(document).ready(function($) {
}, 60000);
})();
-
(function fetchNews() {
$.feedToJson({
feed:'http://feeds.nos.nl/nosjournaal?format=rss',