Adds noscript HTML

This commit is contained in:
Saptak S 2020-07-04 19:25:38 +05:30
parent 7215b463ed
commit 992ced72f6
No known key found for this signature in database
GPG key ID: 2D9B32E54C68A3FB
4 changed files with 12 additions and 14 deletions

View file

@ -4,7 +4,6 @@ from flask import (
render_template, render_template,
make_response, make_response,
jsonify, jsonify,
flash,
redirect, redirect,
session, session,
) )

View file

@ -187,6 +187,10 @@ table.file-list td:last-child {
} }
} }
.no-js {
display: none;
}
.upload-wrapper { .upload-wrapper {
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View file

@ -1,5 +1,6 @@
$(function(){ $(function(){
$(document).ready(function(){ $(document).ready(function(){
$('.chat-container').removeClass('no-js');
var socket = io.connect('http://' + document.domain + ':' + location.port + '/chat'); var socket = io.connect('http://' + document.domain + ':' + location.port + '/chat');
// Store current username received from app context // Store current username received from app context

View file

@ -11,20 +11,14 @@
<img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare"> <img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
<h1>OnionShare</h1> <h1>OnionShare</h1>
</header> </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> <div class="chat-container no-js">
<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-users"> <div class="chat-users">
<div class="editable-username"> <div class="editable-username">
<input id="username" value="{{ username }}" /> <input id="username" value="{{ username }}" />