diff options
Diffstat (limited to 'modules-available/main/templates/page-main.html')
-rw-r--r-- | modules-available/main/templates/page-main.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/main/templates/page-main.html b/modules-available/main/templates/page-main.html index 1b7cc62d..ee85220e 100644 --- a/modules-available/main/templates/page-main.html +++ b/modules-available/main/templates/page-main.html @@ -5,11 +5,13 @@ <script type="application/javascript"><!-- document.addEventListener("DOMContentLoaded", function () { - if (Date.now && Math.abs(Date.now() / 1000 - {{now}}) > 300) { + if (Date.now && Math.abs(Date.now() / 1000 - {{now}}) > 300 + && (!window.sessionStorage || window.sessionStorage.getItem('nau') != {{now}})) { $('#browser-time').text(new Date().toLocaleString()); $('#server-time').text(new Date({{now}} * 1000).toLocaleString()); $('#time-warner').show(); } + if (window.sessionStorage) window.sessionStorage.setItem('nau', {{now}}); }); //--></script> |