From 0ccacc490fe33044c593d8a97a11f193adbaf9ac Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 19 Jan 2012 20:31:36 +0100 Subject: [PATCH] Do not try to reload the picture immediately from archivers; if it fails to load from archivers, try to load from 4chan again. --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 6f59cf6ff..bda3e90f8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3023,8 +3023,8 @@ thumb = this.previousSibling; imgExpand.contract(thumb); src = this.src.split('/'); - if (url = redirect.image(src[3], src[5])) { - return imgExpand.expand(thumb, url); + if (src[2] === 'images.4chan.org' && (url = redirect.image(src[3], src[5]))) { + return setTimeout(imgExpand.expand, 10000, thumb, url); } else if (engine === 'webkit') { return req = $.ajax(this.src, (function() { if (this.status !== 404) { diff --git a/script.coffee b/script.coffee index 0b00eb3bd..1def04236 100644 --- a/script.coffee +++ b/script.coffee @@ -2340,8 +2340,8 @@ imgExpand = thumb = @previousSibling imgExpand.contract thumb src = @src.split '/' - if url = redirect.image src[3], src[5] - imgExpand.expand thumb, url + if src[2] is 'images.4chan.org' and url = redirect.image src[3], src[5] + setTimeout imgExpand.expand, 10000, thumb, url #navigator.online is not x-browser/os yet else if engine is 'webkit' req = $.ajax @src, (->