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