diff options
| -rw-r--r-- | background_scripts/commands.coffee | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index f5a3840b..3684304c 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -114,23 +114,21 @@ Commands = delete currentMapping[key][prop] for prop in ["keySequence", "description"] chrome.storage.local.set normalModeKeyStateMapping: keyStateMapping - # Build the "helpPageData" data structure which the help page needs and place it in Chrome storage. We do - # this on the "nextTick" because there's not need for it to be done synchronously. + # Build the "helpPageData" data structure which the help page needs and place it in Chrome storage. prepareHelpPageData: -> - Utils.nextTick => - commandToKey = {} - for own key, registryEntry of @keyToCommandRegistry - (commandToKey[registryEntry.command] ?= []).push key - commandGroups = {} - for own group, commands of @commandGroups - commandGroups[group] = [] - for command in commands - commandGroups[group].push - command: command - description: @availableCommands[command].description - keys: commandToKey[command] ? [] - advanced: command in @advancedCommands - chrome.storage.local.set helpPageData: commandGroups + commandToKey = {} + for own key, registryEntry of @keyToCommandRegistry + (commandToKey[registryEntry.command] ?= []).push key + commandGroups = {} + for own group, commands of @commandGroups + commandGroups[group] = [] + for command in commands + commandGroups[group].push + command: command + description: @availableCommands[command].description + keys: commandToKey[command] ? [] + advanced: command in @advancedCommands + chrome.storage.local.set helpPageData: commandGroups # An ordered listing of all available commands, grouped by type. This is the order they will # be shown in the help page. |
