This commit is contained in:
James Campos 2012-02-20 14:09:17 -08:00
commit 4a54b9aa09
2 changed files with 14 additions and 2 deletions

View File

@ -100,6 +100,7 @@
Imaging: {
'Image Auto-Gif': [false, 'Animate gif thumbnails'],
'Image Expansion': [true, 'Expand images'],
'Expand All (Unscrolled)': [false, 'Expand all images will only expand those which you have not scrolled past'],
'Image Hover': [false, 'Show full image on mouseover'],
'Sauce': [true, 'Add sauce to images'],
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
@ -3393,7 +3394,13 @@
_ref = $$('img[md5]');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
thumb = _ref[_i];
imgExpand.expand(thumb);
if (conf['Expand All (Unscrolled)']) {
if (thumb.getBoundingClientRect().bottom >= 0) {
imgExpand.expand(thumb);
}
} else {
imgExpand.expand(thumb);
}
}
} else {
_ref2 = $$('img[md5][hidden]');

View File

@ -22,6 +22,7 @@ config =
Imaging:
'Image Auto-Gif': [false, 'Animate gif thumbnails']
'Image Expansion': [true, 'Expand images']
'Expand All (Unscrolled)': [false, 'Expand all images will only expand those which you have not scrolled past']
'Image Hover': [false, 'Show full image on mouseover']
'Sauce': [true, 'Add sauce to images']
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
@ -2664,7 +2665,11 @@ imgExpand =
imgExpand.on = @checked
if imgExpand.on #expand
for thumb in $$ 'img[md5]'
imgExpand.expand thumb
if conf['Expand All (Unscrolled)']
if thumb.getBoundingClientRect().bottom >= 0
imgExpand.expand thumb
else
imgExpand.expand thumb
else #contract
for thumb in $$ 'img[md5][hidden]'
imgExpand.contract thumb