From 0cc1c97868a90f9b566a170424eb1ea87711f097 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 31 Mar 2013 16:16:01 -0700 Subject: [PATCH] Fix image expansion --- 4chan-X.user.js | 4 ++-- src/features.coffee | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4chan-X.user.js b/4chan-X.user.js index 25b8168b9..090121018 100644 --- a/4chan-X.user.js +++ b/4chan-X.user.js @@ -20,7 +20,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== -/* 4chan X Beta - Version 3.0.0 - 2013-03-28 +/* 4chan X Beta - Version 3.0.0 - 2013-03-31 * https://4chan-x.just-believe.in/ * * Copyright (c) 2009-2011 James Campos @@ -4951,7 +4951,7 @@ rect = thumb.parentNode.getBoundingClientRect(); if (rect.bottom > 0) { postRect = post.nodes.root.getBoundingClientRect(); - headRect = Header.toggle.getBoundingClientRect(); + headRect = Header.bar.getBoundingClientRect(); top = postRect.top - headRect.top - headRect.height - 2; root = $.engine === 'webkit' ? d.body : doc; if (rect.top < 0) { diff --git a/src/features.coffee b/src/features.coffee index 4828ed660..c0a162bfc 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -3197,7 +3197,7 @@ ImageExpand = # Scroll back to the thumbnail when contracting the image # to avoid being left miles away from the relevant post. postRect = post.nodes.root.getBoundingClientRect() - headRect = Header.toggle.getBoundingClientRect() + headRect = Header.bar.getBoundingClientRect() top = postRect.top - headRect.top - headRect.height - 2 root = if $.engine is 'webkit' d.body