forked from rDrama/rDrama
fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/5171921#context
parent
5fc27db8d4
commit
502fb2bb64
|
@ -324,6 +324,12 @@ function post_comment(fullname, hide){
|
|||
remove_dialog();
|
||||
if (fullname.startsWith('c_'))
|
||||
restore_reply_buttons(fullname)
|
||||
|
||||
if (fullname.startsWith('p_')) {
|
||||
const viewbtn = document.getElementById('viewbtn')
|
||||
if (viewbtn)
|
||||
viewbtn.dataset.ids = viewbtn.dataset.ids.slice(0, -1) + `, ${data['id']}]`
|
||||
}
|
||||
}
|
||||
else {
|
||||
showToast(false, getMessageFromJsonData(false, data));
|
||||
|
|
|
@ -426,7 +426,7 @@ def comment(v):
|
|||
gevent.spawn(postprocess_comment, c.body, c.body_html, c.id)
|
||||
|
||||
if v.client: return c.json
|
||||
return {"comment": render_template("comments.html", v=v, comments=[c])}
|
||||
return {"id": c.id, "comment": render_template("comments.html", v=v, comments=[c])}
|
||||
|
||||
@app.post("/delete/comment/<int:cid>")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
|
|
Loading…
Reference in New Issue