Adjust pageoffset to update the "Edit On GitHub" link slightly before the user scrolls the relevant subsection

This commit is contained in:
Saivann 2014-12-14 13:18:31 -05:00
parent 53d4a6eebe
commit b3b545c289

View file

@ -430,7 +430,7 @@ function updateSource(e){
if (!document.getElementsByClassName) return;
var t = getEventTarget(e),
nodes = document.getElementsByClassName('sourcefile'),
pageoffset = getPageYOffset(),
pageoffset = Math.max(0, getPageYOffset() + 100),
windowy = getWindowY(),
fallback = nodes[0],
first = [fallback, getTop(fallback)],