From 992ced72f61446d41ce5e02cab83c805212968a0 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Sat, 4 Jul 2020 19:25:38 +0530 Subject: [PATCH] Adds noscript HTML --- onionshare/web/chat_mode.py | 1 - share/static/css/style.css | 4 ++++ share/static/js/chat.js | 1 + share/templates/chat.html | 20 +++++++------------- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/onionshare/web/chat_mode.py b/onionshare/web/chat_mode.py index 965a234c..d07eba81 100644 --- a/onionshare/web/chat_mode.py +++ b/onionshare/web/chat_mode.py @@ -4,7 +4,6 @@ from flask import ( render_template, make_response, jsonify, - flash, redirect, session, ) 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 @@

OnionShare

+ -
- -
- -
+