Small simplify
This commit is contained in:
parent
7939d24640
commit
1227cbd847
@ -6292,12 +6292,7 @@
|
||||
}
|
||||
ImageExpand.contract(post);
|
||||
root = post.nodes.root;
|
||||
rect = (Conf['Advance on contract'] ? (function() {
|
||||
var next;
|
||||
|
||||
next = $.x("following::div[contains(@class,'postContainer')][1]", root);
|
||||
return next || root;
|
||||
})() : root).getBoundingClientRect();
|
||||
rect = (Conf['Advance on contract'] ? $.x("following::div[contains(@class,'postContainer')][1]", root) || root : root).getBoundingClientRect();
|
||||
if (rect.top < 0) {
|
||||
y = rect.top;
|
||||
if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
|
||||
|
||||
@ -6272,12 +6272,7 @@
|
||||
}
|
||||
ImageExpand.contract(post);
|
||||
root = post.nodes.root;
|
||||
rect = (Conf['Advance on contract'] ? (function() {
|
||||
var next;
|
||||
|
||||
next = $.x("following::div[contains(@class,'postContainer')][1]", root);
|
||||
return next || root;
|
||||
})() : root).getBoundingClientRect();
|
||||
rect = (Conf['Advance on contract'] ? $.x("following::div[contains(@class,'postContainer')][1]", root) || root : root).getBoundingClientRect();
|
||||
if (rect.top < 0) {
|
||||
y = rect.top;
|
||||
if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
|
||||
|
||||
@ -62,11 +62,11 @@ ImageExpand =
|
||||
# Scroll back to the thumbnail when contracting the image
|
||||
# to avoid being left miles away from the relevant post.
|
||||
{root} = post.nodes
|
||||
rect = (if Conf['Advance on contract'] then do ->
|
||||
next = $.x "following::div[contains(@class,'postContainer')][1]", root
|
||||
next or root
|
||||
rect = (if Conf['Advance on contract']
|
||||
$.x("following::div[contains(@class,'postContainer')][1]", root) or root
|
||||
else
|
||||
root).getBoundingClientRect()
|
||||
root
|
||||
).getBoundingClientRect()
|
||||
|
||||
if rect.top < 0
|
||||
y = rect.top
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user