diff --git a/nyaa/static/css/main.css b/nyaa/static/css/main.css index 0ecd08191..45efc21fd 100644 --- a/nyaa/static/css/main.css +++ b/nyaa/static/css/main.css @@ -352,6 +352,7 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus { #comment { height: 8em; + min-height: 8em; } .avatar { diff --git a/nyaa/static/js/main.js b/nyaa/static/js/main.js index efe41d9bc..51c954e4b 100644 --- a/nyaa/static/js/main.js +++ b/nyaa/static/js/main.js @@ -268,6 +268,9 @@ document.addEventListener("DOMContentLoaded", function() { // Info bubble stuff document.addEventListener("DOMContentLoaded", function() { var bubble = document.getElementById('infobubble'); + if (!bubble) { + return; + } if (Number(localStorage.getItem('infobubble_dismiss_ts')) < Number(bubble.dataset.ts)) { bubble.removeAttribute('hidden'); } diff --git a/nyaa/templates/view.html b/nyaa/templates/view.html index bf32c3372..5410b00c9 100644 --- a/nyaa/templates/view.html +++ b/nyaa/templates/view.html @@ -5,7 +5,7 @@ {% endblock %} {% block body %} -{% from "_formhelpers.html" import render_field %} +{% from "_formhelpers.html" import render_field, render_markdown_editor %}

@@ -177,7 +177,7 @@

{# Escape newlines into html entities because CF strips blank newlines #}
{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) -}}
- {% if g.user.id == comment.user_id and comment_form %} + {% if g.user.id == comment.user_id and comment_form and not comment.editing_limit_exceeded and (not torrent.comment_locked or g.user.is_moderator) %}
{{ comment_form.csrf_token }}
@@ -225,7 +225,7 @@

{{ comment_form.csrf_token }}
- {{ render_field(comment_form.comment, class_='form-control') }} + {{ render_markdown_editor(comment_form.comment) }}
{% if config.USE_RECAPTCHA and g.user.age < config['ACCOUNT_RECAPTCHA_AGE'] %}