X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9f979033640e55e9eaf62d1f1ae8dca634bdd6e2..421fbd31647ecb40540f767b1d506e0843dfc3a9:/redakcja/static/js/wiki/loader.js?ds=sidebyside diff --git a/redakcja/static/js/wiki/loader.js b/redakcja/static/js/wiki/loader.js index 7e03c396..7e5c8645 100644 --- a/redakcja/static/js/wiki/loader.js +++ b/redakcja/static/js/wiki/loader.js @@ -5,7 +5,7 @@ if (!window.console) { } } -var DEFAULT_PERSPECTIVE = "#SummaryPerspective"; +var DEFAULT_PERSPECTIVE = "#VisualPerspective"; $(function() { @@ -110,6 +110,14 @@ $(function() console.log("Initial tab is:", active_tab) $.wiki.switchToTab(active_tab); + + /* every 5 minutes check for a newer version */ + var revTimer = setInterval(function() { + CurrentDocument.checkRevision({error: function(){ + $('#header').addClass('out-of-date'); + clearInterval(revTimer); + }}); + }, 300000); }, failure: function() { $('#loading-overlay').fadeOut();