delete post confirm() #83

This commit is contained in:
Ryan Stafford 2023-10-04 13:46:12 -04:00
parent aaf0234e5b
commit 0f48251fc0

View file

@ -56,7 +56,7 @@ function commentClick(e) {
} else { return }
e.target.disabled = "disabled"
if (data.get("op") == "delete_comment") {
if (!confirm("Are you sure you want to delete?")) {
if (!confirm("Are you sure?")) {
return false
}
}
@ -242,6 +242,11 @@ function formSubmit(e) {
targ.remove()
return
}
if (data.get("op") == "delete_post") {
if (!confirm("Are you sure?")) {
return false
}
}
e.submitter.disabled = "disabled"
request(targ.target, data,
function(res){
@ -267,6 +272,10 @@ function formSubmit(e) {
targ.remove()
return
}
if (data.get("op") == "delete_post") {
window.location.reload()
return false
}
targ.outerHTML = res
setup()
},