Don't return an archived image url if 404 redirect is disabled. Always enable image retrying on loading error. Close #196
This commit is contained in:
parent
1da1413b15
commit
504d03b9d2
@ -3190,6 +3190,7 @@
|
|||||||
if (url) return location.href = url;
|
if (url) return location.href = url;
|
||||||
},
|
},
|
||||||
image: function(board, filename) {
|
image: function(board, filename) {
|
||||||
|
if (!conf['404 Redirect']) return;
|
||||||
switch (board) {
|
switch (board) {
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'jp':
|
case 'jp':
|
||||||
@ -3371,7 +3372,7 @@
|
|||||||
img = $.el('img', {
|
img = $.el('img', {
|
||||||
src: url || a.href
|
src: url || a.href
|
||||||
});
|
});
|
||||||
if (conf['404 Redirect']) $.on(img, 'error', imgExpand.error);
|
$.on(img, 'error', imgExpand.error);
|
||||||
return $.add(a, img);
|
return $.add(a, img);
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
|
|||||||
@ -2500,6 +2500,7 @@ redirect =
|
|||||||
redirect.thread()
|
redirect.thread()
|
||||||
location.href = url if url
|
location.href = url if url
|
||||||
image: (board, filename) -> #board must be given, the image can originate from a cross-quote
|
image: (board, filename) -> #board must be given, the image can originate from a cross-quote
|
||||||
|
return unless conf['404 Redirect']
|
||||||
switch board
|
switch board
|
||||||
when 'a', 'jp', 'm', 'tg', 'tv', 'u'
|
when 'a', 'jp', 'm', 'tg', 'tv', 'u'
|
||||||
"http://archive.foolz.us/#{board}/full_image/#{filename}"
|
"http://archive.foolz.us/#{board}/full_image/#{filename}"
|
||||||
@ -2605,7 +2606,7 @@ imgExpand =
|
|||||||
a = thumb.parentNode
|
a = thumb.parentNode
|
||||||
img = $.el 'img',
|
img = $.el 'img',
|
||||||
src: url or a.href
|
src: url or a.href
|
||||||
$.on img, 'error', imgExpand.error if conf['404 Redirect']
|
$.on img, 'error', imgExpand.error
|
||||||
$.add a, img
|
$.add a, img
|
||||||
|
|
||||||
error: ->
|
error: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user