diff --git a/4chan_x.user.js b/4chan_x.user.js index 059db7818..c50062b08 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3555,8 +3555,11 @@ error: function() { var URL, post, src, timeoutID; post = Get.postFromNode(this); - ImageExpand.contract(post); $.rm(this); + ImageExpand.contract(post); + if (this.hidden) { + return; + } src = this.src.split('/'); if (!(src[2] === 'images.4chan.org' && (URL = Redirect.image(src[3], src[5])))) { if (g.DEAD) { diff --git a/src/features.coffee b/src/features.coffee index f69e2d939..5dd36a7cc 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -2183,8 +2183,11 @@ ImageExpand = error: -> post = Get.postFromNode @ - ImageExpand.contract post $.rm @ + ImageExpand.contract post + if @hidden + # Don't try to re-expend if it was already contracted. + return src = @src.split '/' unless src[2] is 'images.4chan.org' and URL = Redirect.image src[3], src[5] return if g.DEAD