diff --git a/4chan_x.user.js b/4chan_x.user.js index 700c55e54..fe00db510 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3190,6 +3190,7 @@ if (url) return location.href = url; }, image: function(board, filename) { + if (!conf['404 Redirect']) return; switch (board) { case 'a': case 'jp': @@ -3371,7 +3372,7 @@ img = $.el('img', { src: url || a.href }); - if (conf['404 Redirect']) $.on(img, 'error', imgExpand.error); + $.on(img, 'error', imgExpand.error); return $.add(a, img); }, error: function() { diff --git a/script.coffee b/script.coffee index b0f44e665..ec4bcde14 100644 --- a/script.coffee +++ b/script.coffee @@ -2500,6 +2500,7 @@ redirect = redirect.thread() location.href = url if url image: (board, filename) -> #board must be given, the image can originate from a cross-quote + return unless conf['404 Redirect'] switch board when 'a', 'jp', 'm', 'tg', 'tv', 'u' "http://archive.foolz.us/#{board}/full_image/#{filename}" @@ -2605,7 +2606,7 @@ imgExpand = a = thumb.parentNode img = $.el 'img', src: url or a.href - $.on img, 'error', imgExpand.error if conf['404 Redirect'] + $.on img, 'error', imgExpand.error $.add a, img error: ->