diff options
| author | Stephen Blott | 2016-04-04 06:44:12 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-04-04 06:44:14 +0100 |
| commit | 5d11b86ce60678558784039a7cf85c50dee5bf20 (patch) | |
| tree | d56f814a131b9e953f87d601b7f8f71996aab19c | |
| parent | 240433c3b50fc01e72d840b4b6062334e208b59a (diff) | |
| download | vimium-5d11b86ce60678558784039a7cf85c50dee5bf20.tar.bz2 | |
Shorten link text.
When a link's text is particularly long, displaying all of its text
makes the hint look weird - so shorten it.
We still use the full text for matching.
| -rw-r--r-- | content_scripts/link_hints.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 92efcc7a..a91c45d4 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -421,8 +421,10 @@ class FilterHints hint.reverse().join "" renderMarker: (marker) -> + linkText = marker.linkText + linkText = "#{linkText[..32]}..." if 35 < linkText.length marker.innerHTML = spanWrap(marker.hintString + - (if marker.showLinkText then ": " + marker.linkText else "")) + (if marker.showLinkText then ": " + linkText else "")) fillInMarkers: (hintMarkers) -> @renderMarker marker for marker in hintMarkers when marker.isLocalMarker |
