Created
August 3, 2010 23:59
-
-
Save cduruk/507408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getBottomY = function () { | |
var getElBottomY = function (el) { | |
return el.getHeight() + el.cumulativeOffset()[1]; | |
}; | |
articleEl = articleEl || $$('#article .first')[0] || $$('#content .hentry')[0] || $$('#main .hentry')[0]; | |
cColumnEl = cColumnEl || $$('#main .cColumn')[0] || $$('#cCol')[0] || $$('#main .cColumn')[0]; | |
// Compensate for extra space on ads for cColumnBottomY | |
var articleBottomY = getElBottomY(articleEl), | |
cColumnBottomY = getElBottomY(cColumnEl) + popUpElHeight - 30; | |
return (articleBottomY > cColumnBottomY) ? articleBottomY : cColumnBottomY; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment