diff options
| author | Phil Crosby | 2010-01-30 21:36:29 -0800 |
|---|---|---|
| committer | Phil Crosby | 2010-01-30 21:36:29 -0800 |
| commit | a56b341c3b233927ef27e318510c85b1c4e6a9ec (patch) | |
| tree | b6449eb40c8f0fe64db6e439098bd1025072fe5b | |
| parent | d7f05d73cc90c4f4855bc52569430912ea7d9831 (diff) | |
| download | vimium-a56b341c3b233927ef27e318510c85b1c4e6a9ec.tar.bz2 | |
Exclude links which are scrolled horizontally off the page when hinting.
| -rw-r--r-- | linkHints.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js index 0121daa3..8d3b3b0d 100644 --- a/linkHints.js +++ b/linkHints.js @@ -67,7 +67,8 @@ function getVisibleClickableElements() { // Note that getBoundingClientRect() is relative to the viewport var boundingRect = element.getBoundingClientRect(); // Exclude links which have just a few pixels on screen, because the link hints won't show for them anyway. - if (boundingRect.bottom <= 4 || boundingRect.top >= window.innerHeight - 4) + if (boundingRect.bottom <= 4 || boundingRect.top >= window.innerHeight - 4 || + boundingRect.left <= 0 || boundingRect.right >= window.innerWidth - 4) continue; if (boundingRect.width < 3 || boundingRect.height < 3) |
