Merge pull request #267 from ahodesuka/master

Scroll back up to anchor -42px when unexpanding images.
This commit is contained in:
Mayhem 2012-02-21 09:46:29 -08:00
commit db2b24704c
3 changed files with 5 additions and 4 deletions

View File

@ -3485,8 +3485,8 @@
var rect, thumb;
thumb = a.firstChild;
if (thumb.hidden) {
rect = a.parentNode.getBoundingClientRect();
if (rect.top < 0) d.body.scrollTop += rect.top;
rect = a.getBoundingClientRect();
if (rect.top < 0) d.body.scrollTop += rect.top - 42;
if (rect.left < 0) d.body.scrollLeft += rect.left;
return imgExpand.contract(thumb);
} else {

View File

@ -1,6 +1,7 @@
master
- ahodesuka
Add Open Reply in New Tab option for replies made from the main board (not dumping).
Scroll back up (top of anchor - 42px) when unexpanding images.
- Mayhem
The Filter now has per filter settings:
- Filter the OP only along its thread, replies only, or both.

View File

@ -2804,8 +2804,8 @@ imgExpand =
toggle: (a) ->
thumb = a.firstChild
if thumb.hidden
rect = a.parentNode.getBoundingClientRect()
d.body.scrollTop += rect.top if rect.top < 0
rect = a.getBoundingClientRect()
d.body.scrollTop += rect.top - 42 if rect.top < 0
d.body.scrollLeft += rect.left if rect.left < 0
imgExpand.contract thumb
else