   VimiumHelpDialog.init()
 
   container.getElementsByClassName("optionsPage")[0].addEventListener("click",
-    -> chrome.extension.sendMessage({ handler: "openOptionsPageInNewTab" })
+    -> chrome.runtime.sendMessage({ handler: "openOptionsPageInNewTab" })
     false)
 
 

    getActiveState: -> { enabled: isEnabledForUrl }
    disableVimium: disableVimium

  chrome.extension.onMessage.addListener (request, sender, sendResponse) ->
    # in the options page, we will receive requests from both content and background scripts. ignore those
    # from the former.
    return if sender.tab and not sender.tab.url.startsWith 'chrome-extension://'

    if (response.validFirstKeys)
      validFirstKeys = response.validFirstKeys
  else
    chrome.runtime.sendMessage({ handler: "getCompletionKeys" }, refreshCompletionKeys)

isValidFirstKey = (keyChar) ->
  validFirstKeys[keyChar] || /[1-9]/.test(keyChar)
