diff options
| author | Stephen Blott | 2016-01-31 13:10:39 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-01-31 13:10:39 +0000 |
| commit | d16c7c52ef12debbde5538a353f683be845e8847 (patch) | |
| tree | bb5cc4cc0ae5a0b087dac97d7930973ddd92e055 /background_scripts/commands.coffee | |
| parent | 72f76a4ef22b06e076cf631b8e0c3ad5cc3ccfbd (diff) | |
| parent | eba184604678dbc11fffa04c8fe05ff537a50e36 (diff) | |
| download | vimium-d16c7c52ef12debbde5538a353f683be845e8847.tar.bz2 | |
Merge pull request #1958 from smblott-github/logging-page
Add a logging page...
Diffstat (limited to 'background_scripts/commands.coffee')
| -rw-r--r-- | background_scripts/commands.coffee | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index e3a6f0dc..0a296c3e 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -13,7 +13,7 @@ Commands = # command passed to it. This is used to implement e.g. "closing of 3 tabs". addCommand: (command, description, options) -> if command of @availableCommands - console.log(command, "is already defined! Check commands.coffee for duplicates.") + logMessage? "#{command} is already defined! Check commands.coffee for duplicates." return options ||= {} @@ -26,7 +26,7 @@ Commands = mapKeyToCommand: ({ key, command, options }) -> unless @availableCommands[command] - console.log command, "doesn't exist!" + logMessage? "#{command} doesn't exist!" return options ?= [] @@ -55,13 +55,13 @@ Commands = [ _, key, command, options... ] = tokens if command? and @availableCommands[command] key = @normalizeKey key - console.log "Mapping", key, "to", command + logMessage? "Mapping #{key} to #{command}" @mapKeyToCommand { key, command, options } when "unmap" if tokens.length == 2 key = @normalizeKey tokens[1] - console.log "Unmapping", key + logMessage? "Unmapping #{key}" delete @keyToCommandRegistry[key] when "unmapAll" |
