post.img -> img in auto-gif.
This commit is contained in:
parent
e6954fd254
commit
c6a72d9fae
@ -3710,17 +3710,18 @@
|
||||
return Main.callbacks.push(this.node);
|
||||
},
|
||||
node: function(post) {
|
||||
var img, src;
|
||||
if (post.root.hidden || !post.img) {
|
||||
var gif, img, src;
|
||||
img = post.img;
|
||||
if (post.root.hidden || !img) {
|
||||
return;
|
||||
}
|
||||
src = post.img.parentNode.href;
|
||||
if (/gif$/.test(src) && !/spoiler/.test(post.img.src)) {
|
||||
img = $.el('img');
|
||||
$.on(img, 'load', function() {
|
||||
return post.img.src = src;
|
||||
src = img.parentNode.href;
|
||||
if (/gif$/.test(src) && !/spoiler/.test(img.src)) {
|
||||
gif = $.el('img');
|
||||
$.on(gif, 'load', function() {
|
||||
return img.src = src;
|
||||
});
|
||||
return img.src = src;
|
||||
return gif.src = src;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -2845,14 +2845,15 @@ AutoGif =
|
||||
return if g.BOARD is 'gif'
|
||||
Main.callbacks.push @node
|
||||
node: (post) ->
|
||||
return if post.root.hidden or not post.img
|
||||
src = post.img.parentNode.href
|
||||
if /gif$/.test(src) and !/spoiler/.test post.img.src
|
||||
img = $.el 'img'
|
||||
$.on img, 'load', ->
|
||||
{img} = post
|
||||
return if post.root.hidden or not img
|
||||
src = img.parentNode.href
|
||||
if /gif$/.test(src) and !/spoiler/.test img.src
|
||||
gif = $.el 'img'
|
||||
$.on gif, 'load', ->
|
||||
# Replace the thumbnail once the GIF has finished loading.
|
||||
post.img.src = src
|
||||
img.src = src
|
||||
img.src = src
|
||||
gif.src = src
|
||||
|
||||
ImageExpand =
|
||||
init: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user