onload -> onloadend and remove hardcoded JSON URL in ImageCommon

This commit is contained in:
ccd0 2019-03-23 23:08:54 -07:00
parent 2cdff88b46
commit 7db3041504

View File

@ -54,7 +54,7 @@ ImageCommon =
clearTimeout timeoutID if delay?
cb URL
$.ajax "#{location.protocol}//a.4cdn.org/#{post.board}/thread/#{post.thread}.json", onload: ->
$.ajax Site.urls.threadJSON({boardID: post.boardID, threadID: post.threadID}), onloadend: ->
post.kill !post.isClone if @status is 404
return redirect() if @status isnt 200
for postObj in @response.posts