diff options
author | Micah Lee <micah@micahflee.com> | 2019-02-13 17:40:33 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-02-13 17:40:33 -0800 |
commit | 1c16b092a3c6c433326c82fde72c6bb0c59522ae (patch) | |
tree | 31daf336cca8151977b8ab04d4d80cc1b4efad2c | |
parent | 5755cd625b3eda25c9eaad451ab83ba961d7b1ea (diff) | |
download | onionshare-1c16b092a3c6c433326c82fde72c6bb0c59522ae.tar.gz onionshare-1c16b092a3c6c433326c82fde72c6bb0c59522ae.zip |
Use a div that gets hidden, instead of a <noscript> tag, because the <noscript> tag doesn't when the security slider is on Safer
-rw-r--r-- | share/static/css/style.css | 6 | ||||
-rw-r--r-- | share/static/js/receive.js | 3 | ||||
-rw-r--r-- | share/templates/receive.html | 19 |
3 files changed, 19 insertions, 9 deletions
diff --git a/share/static/css/style.css b/share/static/css/style.css index 45fb0f46..5cf5245e 100644 --- a/share/static/css/style.css +++ b/share/static/css/style.css @@ -193,7 +193,7 @@ li.info { margin: 0 0 20px 0; } -div.noscript { +div#noscript { border: 1px solid #e55454; text-align: left; color: #e55454; @@ -202,3 +202,7 @@ div.noscript { max-width: 700px; margin: 100px 2em 0 2em; } + +div#noscript a, div#noscript a:visited { + color: #e27f7f; +} diff --git a/share/static/js/receive.js b/share/static/js/receive.js index 8047f987..9f1cd575 100644 --- a/share/static/js/receive.js +++ b/share/static/js/receive.js @@ -1,3 +1,6 @@ +// Hide the noscript div, because our javascript is executing +document.getElementById('noscript').style.display = 'none'; + var form = document.getElementById('send'); var fileSelect = document.getElementById('file-select'); var uploadButton = document.getElementById('send-button'); diff --git a/share/templates/receive.html b/share/templates/receive.html index 679a3234..02c65cc2 100644 --- a/share/templates/receive.html +++ b/share/templates/receive.html @@ -33,14 +33,17 @@ </div> </form> - <noscript> - <div class="noscript"> - <strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, if you want to upload - a file bigger than 50mb, you must set the Tor Browser security slider to - Standard. Otherwise your upload will never finish. If you plan on - only uploading small files, your current settings are fine. - </div> - </noscript> + <!-- We are not using a <noscript> tag because it only works when the security slider + is set to Safest, not Safer. --> + <div id="noscript"> + <p> + <strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, if you + want to upload a file bigger than 50mb, you must set the Tor Browser + <a rel="noreferrer" target="_blank" href="https://tb-manual.torproject.org/en-US/security-slider/">security slider</a> + to Standard. Otherwise your upload will never finish.</p> + + <p>If you plan on only uploading small files, your current settings are fine.</p> + </div> </div> </div> <script src="/static/js/receive.js"></script> |