diff --git a/files/assets/js/comments.js b/files/assets/js/comments.js index 1478c0f5a..082a1d9a9 100644 --- a/files/assets/js/comments.js +++ b/files/assets/js/comments.js @@ -24,7 +24,7 @@ function morecomments(cid) { var form = new FormData(); form.append("formkey", formkey()); const xhr = new XMLHttpRequest(); - xhr.open("post", `/morecomments/${cid}`); + xhr.open("get", `/morecomments/${cid}`); xhr.setRequestHeader('xhr', 'xhr'); xhr.onload=function(){ if (xhr.status==200) { diff --git a/files/assets/js/viewmore.js b/files/assets/js/viewmore.js index e152f3486..291e8126a 100644 --- a/files/assets/js/viewmore.js +++ b/files/assets/js/viewmore.js @@ -6,7 +6,7 @@ function viewmore(pid,sort,offset,ids) { form.append("formkey", formkey()); form.append("ids", ids); const xhr = new XMLHttpRequest(); - xhr.open("post", `/viewmore/${pid}/${sort}/${offset}`); + xhr.open("get", `/viewmore/${pid}/${sort}/${offset}`); xhr.setRequestHeader('xhr', 'xhr'); xhr.onload=function(){ if (xhr.status==200) { diff --git a/files/routes/posts.py b/files/routes/posts.py index 0887e5581..7ea00c6f8 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -253,7 +253,7 @@ def post_id(pid, anything=None, v=None, sub=None): else: template = "submission.html" return render_template(template, v=v, p=post, ids=list(ids), sort=sort, render_replies=True, offset=offset, sub=post.subr) -@app.post("/viewmore///") +@app.get("/viewmore///") @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_desired def viewmore(v, pid, sort, offset): @@ -356,7 +356,7 @@ def viewmore(v, pid, sort, offset): return render_template("comments.html", v=v, comments=comments, ids=list(ids), render_replies=True, pid=pid, sort=sort, offset=offset, ajax=True) -@app.post("/morecomments/") +@app.get("/morecomments/") @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_desired def morecomments(v, cid): diff --git a/files/templates/comments.html b/files/templates/comments.html index cf0cd64e7..789aaf15f 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -920,7 +920,7 @@ {% include "expanded_image_modal.html" %} - + + {% endif %} {% elif not p.replies and p.deleted_utc == 0 %}