From 79b0c85d72baa22ece5ad586f4582a85ff7a466a Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 22 Sep 2011 20:25:19 +0200 Subject: [PATCH] Set to retry after one second unless the thread 404'd. --- 4chan_x.user.js | 4 +++- script.coffee | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b77c3c370..4882c635c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2732,7 +2732,9 @@ $.bind(img, 'error', function(e) { thumb = this.previousSibling; imgExpand.contract(thumb); - return imgExpand.expand(thumb); + if (!g.dead) { + return setTimeout(imgExpand.expand, 1000, thumb); + } }); return $.add(a, img); }, diff --git a/script.coffee b/script.coffee index 6802230f7..c97cbe807 100644 --- a/script.coffee +++ b/script.coffee @@ -2025,7 +2025,8 @@ imgExpand = $.bind img, 'error', (e) -> thumb = @previousSibling imgExpand.contract thumb - imgExpand.expand thumb + unless g.dead + setTimeout imgExpand.expand, 1000, thumb $.add a, img dialog: ->