1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-13 09:26:23 -07:00

Before showing delete lightbox, check if it was just the file

This commit is contained in:
Eggbertx 2025-02-09 17:53:08 -08:00
parent dfb9fc045c
commit d61e3c62c2

View file

@ -97,10 +97,10 @@ function deletePost(id: number, board: string, fileOnly = false) {
alertLightbox(`Delete failed: ${data.error}`, "Error");
}).done(data => {
if(data.error === undefined || data === "") {
if(location.href.indexOf(`/${board}/res/${id}.html`) > -1) {
alertLightbox("Thread deleted", "Success");
} else if(fileOnly) {
if(fileOnly) {
deletePostFile(id);
} else if(location.href.indexOf(`/${board}/res/${id}.html`) > -1) {
alertLightbox("Thread deleted", "Success");
} else {
deletePostElement(id);
}