remotes/1693045480750635534/spooky-22
Aevann1 2021-12-11 02:05:01 +02:00
parent 1efc3aec63
commit fab24da237
2 changed files with 11 additions and 3 deletions

View File

@ -322,6 +322,14 @@ def viewmore(v, pid, sort, offset):
return render_template("comments.html", v=v, comments=comments, render_replies=True, pid=pid, sort=sort, offset=offset)
@app.post("/morecomments/<cid>")
@limiter.limit("1/second")
@auth_desired
def morecomments(v, cid):
c = g.db.query(Comment).filter_by(id=cid).first()
comments = c.replies
return render_template("comments.html", v=v, comments=comments, render_replies=True)
@app.post("/edit_post/<pid>")
@limiter.limit("1/second")
@auth_required

View File

@ -485,8 +485,8 @@
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
</div>
{% elif replies %}
<div id="morecomment-{{c.id}}" class="mt-2 more-comments text-small">
<a href="{{c.shortlink}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
<div id="morecomments-{{c.id}}" class="mt-2 more-comments text-small">
<button id="btn-{{c.id}}" class="btn btn-primary" onclick="morecomments('{{c.id}}')">More comments</button>
</div>
{% endif %}
{% endif %}
@ -757,7 +757,7 @@
{% include "expanded_image_modal.html" %}
<script src="/assets/js/comments+submission_listing.js?v=100"></script>
<script src="/assets/js/comments.js?v=13"></script>
<script src="/assets/js/comments.js?v=14"></script>
<script>
{% if p and (not v or v.highlightcomments) %}