Updated how comments are searched for

commentID's aren't neccesarily = to the index, so instead of using it as an index,  I just use a for loop to find the matching comment.
I also added another form at the bottom of the timeline to trick bots

Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
2025-09-24 21:12:21 +01:00
parent 23744f4000
commit 45af80f747
2 changed files with 18 additions and 4 deletions

View File

@@ -22,6 +22,13 @@
<% } %>
<% } %>
</div>
<form method="POST" action="/submit_nothing" style="display:none">
<!-- Form is used to help mitigate spam as it is the last form on the front page -->
<input type="hidden" name="post_index" value="0">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
</form>
<footer>
<%- include('../partials/footer'); %>
</footer>