 # In 'filter' mode, our link hints are numbers, and the user can narrow down the range of possibilities by
 # typing the text of the link itself.
 #
+OPEN_IN_CURRENT_TAB = {}
+OPEN_IN_NEW_TAB = {}
+OPEN_WITH_QUEUE = {}
+COPY_LINK_URL = {}
+
 LinkHints =
   hintMarkerContainingDiv: null
-  shouldOpenInNewTab: false
-  shouldOpenWithQueue: false
+  # one of the enums listed at the top of this file
+  mode: undefined
   # function that does the appropriate action on the selected link
   linkActivator: undefined
   # While in delayMode, all keypresses have no effect.

      return
    @isActive = true

    @setOpenLinkMode(openInNewTab, withQueue, copyLinkUrl)
    hintMarkers = @markerMatcher.fillInMarkers(@createMarkerFor(el) for el in @getVisibleClickableElements())

    DomUtils.addCssToPage(settings.get("userDefinedLinkHintCss"), "vimiumLinkHintCss")

     "@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"])

  # We need this as a top-level function because our command system doesn't yet support arguments.
  activateModeToOpenInNewTab: -> @activateMode(OPEN_IN_NEW_TAB)
  activateModeToCopyLinkUrl: -> @activateMode(COPY_LINK_URL)
  activateModeWithQueue: -> @activateMode(OPEN_WITH_QUEUE)

  activateMode: (mode = OPEN_IN_CURRENT_TAB) ->
    # we need documentElement to be ready in order to append links
    return unless document.documentElement

