diff options
| author | Phil Crosby | 2010-01-30 21:33:13 -0800 |
|---|---|---|
| committer | Phil Crosby | 2010-01-30 21:33:13 -0800 |
| commit | d7f05d73cc90c4f4855bc52569430912ea7d9831 (patch) | |
| tree | 09ff446408cac3f567aab378cea28614fc0301fb /linkHints.js | |
| parent | 99848a6dedfda243f02f4544ed309f8d4f869f1c (diff) | |
| download | vimium-d7f05d73cc90c4f4855bc52569430912ea7d9831.tar.bz2 | |
When hinting, exclude links which have just a few pixels on screen.
The link hints won't show for them anyway.
Diffstat (limited to 'linkHints.js')
| -rw-r--r-- | linkHints.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linkHints.js b/linkHints.js index 1e240183..0121daa3 100644 --- a/linkHints.js +++ b/linkHints.js @@ -66,7 +66,8 @@ function getVisibleClickableElements() { // Note that getBoundingClientRect() is relative to the viewport var boundingRect = element.getBoundingClientRect(); - if (boundingRect.bottom < 0 || boundingRect.top > window.innerHeight) + // 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) continue; if (boundingRect.width < 3 || boundingRect.height < 3) |
