diff options
| author | Stephen Blott | 2016-01-30 19:29:00 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-01-30 19:29:00 +0000 | 
| commit | d7b1afc5bddbf1007d2fe35108193dc159024783 (patch) | |
| tree | bd167a567c1ec7f98aca3cfed1e1667262c0fd5e /content_scripts/link_hints.coffee | |
| parent | 4fbd897367b6a347ad0be5d350a85bf10c7ec1b5 (diff) | |
| parent | b95f7c1ed5ddbfafae1fc5197cd4d7cb99aaf1f8 (diff) | |
| download | vimium-d7b1afc5bddbf1007d2fe35108193dc159024783.tar.bz2 | |
Merge pull request #1954 from smblott-github/link-hints-need-links
Exit link hints if there are no links.
Diffstat (limited to 'content_scripts/link_hints.coffee')
| -rw-r--r-- | content_scripts/link_hints.coffee | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 0b1bb20e..db5a932a 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -58,6 +58,11 @@ class LinkHintsMode        # ancestors.        length = (el) -> el.element.innerHTML?.length ? 0        elements.sort (a,b) -> length(a) - length b + +    if elements.length == 0 +      HUD.showForDuration "No links to select.", 2000 +      return +      hintMarkers = (@createMarkerFor(el) for el in elements)      @markerMatcher = new (if Settings.get "filterLinkHints" then FilterHints else AlphabetHints)      @markerMatcher.fillInMarkers hintMarkers | 
