diff options
| author | Stephen Blott | 2015-04-18 12:22:27 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-04-18 12:22:27 +0100 | 
| commit | 870bd7831bdddf26d95017e390329b8f2bd3777e (patch) | |
| tree | ffb2134caed67b419277b53e9af768c5a98efc13 /content_scripts/link_hints.coffee | |
| parent | 760e56d493a1bf3ce6a4c7ec0b24f477f63fb406 (diff) | |
| download | vimium-870bd7831bdddf26d95017e390329b8f2bd3777e.tar.bz2 | |
Mode indicator: fix for link hints.
Diffstat (limited to 'content_scripts/link_hints.coffee')
| -rw-r--r-- | content_scripts/link_hints.coffee | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 85c09257..f1c7c43c 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -54,6 +54,15 @@ LinkHints =        return      @isActive = true +    @hintMode = new Mode +      name: "hint/#{mode.name}" +      indicator: false +      passInitialKeyupEvents: true +      keydown: @onKeyDownInMode.bind(this, hintMarkers), +      # trap all key events +      keypress: -> false +      keyup: -> false +      @setOpenLinkMode(mode)      hintMarkers = (@createMarkerFor(el) for el in @getVisibleClickableElements())      @getMarkerMatcher().fillInMarkers(hintMarkers) @@ -64,14 +73,6 @@ LinkHints =      @hintMarkerContainingDiv = DomUtils.addElementList(hintMarkers,        { id: "vimiumHintMarkerContainer", className: "vimiumReset" }) -    @hintMode = new Mode -      name: "hint/#{mode.name}" -      passInitialKeyupEvents: true -      keydown: @onKeyDownInMode.bind(this, hintMarkers), -      # trap all key events -      keypress: -> false -      keyup: -> false -    setOpenLinkMode: (@mode) ->      if @mode is OPEN_IN_NEW_BG_TAB or @mode is OPEN_IN_NEW_FG_TAB or @mode is OPEN_WITH_QUEUE        if @mode is OPEN_IN_NEW_BG_TAB | 
