Add an option to only expand images which have not been scrolled past when using the expand all button.
This commit is contained in:
parent
18898b825c
commit
75f41069ad
@ -100,6 +100,7 @@
|
|||||||
Imaging: {
|
Imaging: {
|
||||||
'Image Auto-Gif': [false, 'Animate gif thumbnails'],
|
'Image Auto-Gif': [false, 'Animate gif thumbnails'],
|
||||||
'Image Expansion': [true, 'Expand images'],
|
'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'],
|
'Image Hover': [false, 'Show full image on mouseover'],
|
||||||
'Sauce': [true, 'Add sauce to images'],
|
'Sauce': [true, 'Add sauce to images'],
|
||||||
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
|
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
|
||||||
@ -3392,7 +3393,13 @@
|
|||||||
_ref = $$('img[md5]');
|
_ref = $$('img[md5]');
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
thumb = _ref[_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 {
|
} else {
|
||||||
_ref2 = $$('img[md5][hidden]');
|
_ref2 = $$('img[md5][hidden]');
|
||||||
|
|||||||
@ -22,6 +22,7 @@ config =
|
|||||||
Imaging:
|
Imaging:
|
||||||
'Image Auto-Gif': [false, 'Animate gif thumbnails']
|
'Image Auto-Gif': [false, 'Animate gif thumbnails']
|
||||||
'Image Expansion': [true, 'Expand images']
|
'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']
|
'Image Hover': [false, 'Show full image on mouseover']
|
||||||
'Sauce': [true, 'Add sauce to images']
|
'Sauce': [true, 'Add sauce to images']
|
||||||
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
|
'Reveal Spoilers': [false, 'Replace spoiler thumbnails by the original thumbnail']
|
||||||
@ -2663,7 +2664,11 @@ imgExpand =
|
|||||||
imgExpand.on = @checked
|
imgExpand.on = @checked
|
||||||
if imgExpand.on #expand
|
if imgExpand.on #expand
|
||||||
for thumb in $$ 'img[md5]'
|
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
|
else #contract
|
||||||
for thumb in $$ 'img[md5][hidden]'
|
for thumb in $$ 'img[md5][hidden]'
|
||||||
imgExpand.contract thumb
|
imgExpand.contract thumb
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user