Fixed detection of links which are only partially inside the viewport

The best way to demonstrate this issue (at least the way I see it) is to open http://simonwhitaker.github.io/github-fork-ribbon-css and try to navigate links with "f". Before the fix only 1 out of 4 ribbons is detected.