Mark posts as dead as soon as we delete them.
This commit is contained in:
parent
3d72a2331c
commit
98e46dd430
@ -1566,12 +1566,12 @@ DeleteLink =
|
|||||||
|
|
||||||
link = @
|
link = @
|
||||||
$.ajax $.id('delform').action.replace("/#{g.BOARD}/", "/#{post.board}/"), {
|
$.ajax $.id('delform').action.replace("/#{g.BOARD}/", "/#{post.board}/"), {
|
||||||
onload: -> DeleteLink.load link, @response
|
onload: -> DeleteLink.load link, post, @response
|
||||||
onerror: -> DeleteLink.error link
|
onerror: -> DeleteLink.error link
|
||||||
}, {
|
}, {
|
||||||
form: $.formData form
|
form: $.formData form
|
||||||
}
|
}
|
||||||
load: (link, html) ->
|
load: (link, post, html) ->
|
||||||
tmpDoc = d.implementation.createHTMLDocument ''
|
tmpDoc = d.implementation.createHTMLDocument ''
|
||||||
tmpDoc.documentElement.innerHTML = html
|
tmpDoc.documentElement.innerHTML = html
|
||||||
if tmpDoc.title is '4chan - Banned' # Ban/warn check
|
if tmpDoc.title is '4chan - Banned' # Ban/warn check
|
||||||
@ -1580,6 +1580,9 @@ DeleteLink =
|
|||||||
s = msg.textContent
|
s = msg.textContent
|
||||||
$.on link, 'click', DeleteLink.delete
|
$.on link, 'click', DeleteLink.delete
|
||||||
else
|
else
|
||||||
|
if tmpDoc.title is 'Updating index...'
|
||||||
|
# We're 100% sure.
|
||||||
|
(post.origin or post).kill()
|
||||||
s = 'Deleted'
|
s = 'Deleted'
|
||||||
link.textContent = s
|
link.textContent = s
|
||||||
error: (link) ->
|
error: (link) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user