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:
parent
dfb9fc045c
commit
d61e3c62c2
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue