automatically reload pictures

This commit is contained in:
Nicolas Stepien 2011-09-22 04:39:50 +02:00
parent 999ea6e0f7
commit 07ecbda653
3 changed files with 10 additions and 0 deletions

View File

@ -2727,6 +2727,11 @@
_ref = filesize.textContent.match(/(\d+)x/), _ = _ref[0], max = _ref[1];
img.style.maxWidth = "-moz-calc(" + max + "px)";
}
$.bind(img, 'error', function(e) {
thumb = this.previousSibling;
imgExpand.contract(thumb);
return imgExpand.expand(thumb);
});
return $.add(a, img);
},
dialog: function() {

View File

@ -1,6 +1,7 @@
master
- mayhem
initiate 4chan X earlier
automatically reload expanded pictures on error
2.20.1
- mayhem

View File

@ -2018,6 +2018,10 @@ imgExpand =
filesize = $ 'span.filesize', a.parentNode
[_, max] = filesize.textContent.match /(\d+)x/
img.style.maxWidth = "-moz-calc(#{max}px)"
$.bind img, 'error', (e) ->
thumb = @previousSibling
imgExpand.contract thumb
imgExpand.expand thumb
$.add a, img
dialog: ->