diff options
| author | Stephen Blott | 2016-01-30 15:47:04 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2016-01-30 15:47:04 +0000 | 
| commit | b95f7c1ed5ddbfafae1fc5197cd4d7cb99aaf1f8 (patch) | |
| tree | 178c7160a295d8fd562bd70503505afbfac72e95 /content_scripts/link_hints.coffee | |
| parent | 9002a937d24f62f729978b0b2477396cb0f0de90 (diff) | |
| download | vimium-b95f7c1ed5ddbfafae1fc5197cd4d7cb99aaf1f8.tar.bz2 | |
Exit link hints if there are no links.
If there are no links on a page, then link-hints mode should exit immediately.
Fixes #1395.
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 07deaf61..60093bc7 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 | 
