diff options
author | George Moschovitis <george.moschovitis@gmail.com> | 2018-12-18 09:11:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-18 09:11:35 +0200 |
commit | 0237179b98ff8026985d74207f7207882c3ec73b (patch) | |
tree | 97d212b9677bf7e004b3618dc8a70102973c1346 /web | |
parent | dce316c8b4aeaca766e2d862c957ee7029dd0b3e (diff) |
Show a warning if JavaScript is disabled #2422 (#4999)
Diffstat (limited to 'web')
-rw-r--r-- | web/gui/index.html | 14 | ||||
-rw-r--r-- | web/gui/main.css | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/web/gui/index.html b/web/gui/index.html index af03f64046..635038458a 100644 --- a/web/gui/index.html +++ b/web/gui/index.html @@ -55,10 +55,16 @@ </head> <body data-spy="scroll" data-target="#sidebar" data-offset="100"> - <div id="loadOverlay" class="loadOverlay" style="background-color: #888; color: #888;"> - netdata<br/><div style="font-size: 3vh;">Real-time performance monitoring, done right!</div> + <div id="loadOverlay" class="loadOverlay" style="background-color: #fff; color: #888;"> + <div style="font-size: 3vh;"> + You must enable JavaScript in order to use Netdata!<br /> + You can do this in <a href="https://enable-javascript.com/" target="_blank">your browser settings</a>. + </div> </div> <script type="text/javascript"> + // Cleanup JS warning. + document.documentElement.style.overflowY = "scroll"; + // Change the loadOverlay colors ASAP to match the theme. let theme; const hash = document.location.hash; @@ -69,7 +75,9 @@ } else { theme = localStorage.getItem('netdataTheme') || 'slate'; } - document.getElementById('loadOverlay').style = theme == 'slate' ? "background-color: #272b30; color: #373b40;" : "background-color: #fff; color: #ddd;"; + const overlayEl = document.getElementById('loadOverlay'); + overlayEl.innerHTML = 'netdata<br/><div style="font-size: 3vh;">Real-time performance monitoring, done right!</div>'; + overlayEl.style = theme == 'slate' ? "background-color: #272b30; color: #373b40;" : "background-color: #fff; color: #ddd;"; </script> <nav class="navbar navbar-default navbar-fixed-top" role="banner"> <div class="container"> diff --git a/web/gui/main.css b/web/gui/main.css index c2262b3404..ba622b2652 100644 --- a/web/gui/main.css +++ b/web/gui/main.css @@ -1,6 +1,6 @@ /* force the vertical window scrollbar */ html { - overflow-y: scroll; + overflow-y: hidden; } /* prevent body from hiding under the navbar */ |