diff options
author | Saptak S <saptak013@gmail.com> | 2020-07-04 19:25:38 +0530 |
---|---|---|
committer | Saptak S <saptak013@gmail.com> | 2020-07-04 19:25:38 +0530 |
commit | 992ced72f61446d41ce5e02cab83c805212968a0 (patch) | |
tree | 75b66f291184652111395aa93e65211486e41ee8 /share | |
parent | 7215b463ed4d7f5342ac2e93bcc446baef447068 (diff) | |
download | onionshare-992ced72f61446d41ce5e02cab83c805212968a0.tar.gz onionshare-992ced72f61446d41ce5e02cab83c805212968a0.zip |
Adds noscript HTML
Diffstat (limited to 'share')
-rw-r--r-- | share/static/css/style.css | 4 | ||||
-rw-r--r-- | share/static/js/chat.js | 1 | ||||
-rw-r--r-- | share/templates/chat.html | 20 |
3 files changed, 12 insertions, 13 deletions
diff --git a/share/static/css/style.css b/share/static/css/style.css index 91b41eb3..598f9c08 100644 --- a/share/static/css/style.css +++ b/share/static/css/style.css @@ -187,6 +187,10 @@ table.file-list td:last-child { } } +.no-js { + display: none; +} + .upload-wrapper { align-items: center; justify-content: center; diff --git a/share/static/js/chat.js b/share/static/js/chat.js index b189480f..8bbcc8ec 100644 --- a/share/static/js/chat.js +++ b/share/static/js/chat.js @@ -1,5 +1,6 @@ $(function(){ $(document).ready(function(){ + $('.chat-container').removeClass('no-js'); var socket = io.connect('http://' + document.domain + ':' + location.port + '/chat'); // Store current username received from app context diff --git a/share/templates/chat.html b/share/templates/chat.html index cd474654..1c40065e 100644 --- a/share/templates/chat.html +++ b/share/templates/chat.html @@ -11,20 +11,14 @@ <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare"> <h1>OnionShare</h1> </header> + <noscript> + <p> + Chat <b>requires JavaScript</b>, so you must set your Tor Browser security + level to <b>Safer</b> or <b>Standard</b> to join. + </p> + </noscript> - <div> - <ul id="flashes" class="flashes"> - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} - <li class="{{ category }}">{{ message }}</li> - {% endfor %} - {% endif %} - {% endwith %} - </ul> - </div> - - <div class="chat-container"> + <div class="chat-container no-js"> <div class="chat-users"> <div class="editable-username"> <input id="username" value="{{ username }}" /> |