     if (getActualKeyStrokeLength(key) == 1)
       singleKeyCommands.push(key)
 
-refreshCompletionKeysAfterMappingSave = ->
+# Invoked by options.coffee.
+root.refreshCompletionKeysAfterMappingSave = ->
   validFirstKeys = {}
   singleKeyCommands = []
 

saveHelpDialogSettings = (request) ->
  Settings.set("helpDialog_showAdvancedCommands", request.showAdvancedCommands)

#
# Retrieves the help dialog HTML template from a file, and populates it with the latest keybindings.
#
helpDialogHtml = (showUnboundCommands, showCommandNames, customTitle) ->
  commandsToKey = {}
  for key of Commands.keyToCommandRegistry
    command = Commands.keyToCommandRegistry[key].command

    isEnabled = false if request.url.match(regexp)
  { isEnabledForUrl: isEnabled }

# Called by the popup UI. Strips leading/trailing whitespace and ignores empty strings.
root.addExcludedUrl = (url) ->
  return unless url = url.trim()

  excludedUrls = Settings.get("excludedUrls")
