aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/link_hints.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/link_hints.coffee')
-rw-r--r--content_scripts/link_hints.coffee17
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