only one thumb per root
This commit is contained in:
parent
2857f35042
commit
b33e25ac76
@ -2482,32 +2482,24 @@
|
||||
imgPreloading = {
|
||||
init: function() {
|
||||
return g.callbacks.push(function(root) {
|
||||
var el, parent, thumb, thumbs, _i, _len, _results;
|
||||
thumbs = $$('img[md5]', root);
|
||||
_results = [];
|
||||
for (_i = 0, _len = thumbs.length; _i < _len; _i++) {
|
||||
thumb = thumbs[_i];
|
||||
parent = thumb.parentNode;
|
||||
_results.push(el = $.el('img', {
|
||||
src: parent.href
|
||||
}));
|
||||
}
|
||||
return _results;
|
||||
var el, src, thumb;
|
||||
thumb = $('img[md5]', root);
|
||||
src = thumb.parentNode.href;
|
||||
return el = $.el('img', {
|
||||
src: src
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
imgGif = {
|
||||
init: function() {
|
||||
return g.callbacks.push(function(root) {
|
||||
var src, thumb, thumbs, _i, _len, _results;
|
||||
thumbs = $$('img[md5]', root);
|
||||
_results = [];
|
||||
for (_i = 0, _len = thumbs.length; _i < _len; _i++) {
|
||||
thumb = thumbs[_i];
|
||||
src = thumb.parentNode.href;
|
||||
_results.push(/gif$/.test(src) ? thumb.src = src : void 0);
|
||||
var src, thumb;
|
||||
thumb = $('img[md5]', root);
|
||||
src = thumb.parentNode.href;
|
||||
if (/gif$/.test(src)) {
|
||||
return thumb.src = src;
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@ -1877,19 +1877,17 @@ imageHover =
|
||||
imgPreloading =
|
||||
init: ->
|
||||
g.callbacks.push (root) ->
|
||||
thumbs = $$ 'img[md5]', root
|
||||
for thumb in thumbs
|
||||
parent = thumb.parentNode
|
||||
el = $.el 'img', src: parent.href
|
||||
thumb = $ 'img[md5]', root
|
||||
src = thumb.parentNode.href
|
||||
el = $.el 'img', { src }
|
||||
|
||||
imgGif =
|
||||
init: ->
|
||||
g.callbacks.push (root) ->
|
||||
thumbs = $$ 'img[md5]', root
|
||||
for thumb in thumbs
|
||||
src = thumb.parentNode.href
|
||||
if /gif$/.test src
|
||||
thumb.src = src
|
||||
thumb = $ 'img[md5]', root
|
||||
src = thumb.parentNode.href
|
||||
if /gif$/.test src
|
||||
thumb.src = src
|
||||
|
||||
imgExpand =
|
||||
init: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user