diff options
| author | Stephen Blott | 2016-10-09 16:31:23 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-10-09 16:31:23 +0100 | 
| commit | 9c1012ad3a731b015b8a70b58828fbcd0acb7db0 (patch) | |
| tree | edb48cc06710408e082f59619779080051640b46 /lib/utils.coffee | |
| parent | 6596e30392a1ca053223825eda5cde060394a4aa (diff) | |
| download | vimium-9c1012ad3a731b015b8a70b58828fbcd0acb7db0.tar.bz2 | |
Extend key translation to include Escape.
Here, these map to escape:
    translate x <c-[>
    translate <c-c> <c-[>
Diffstat (limited to 'lib/utils.coffee')
| -rw-r--r-- | lib/utils.coffee | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index c06d8ac5..5a028186 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -209,6 +209,13 @@ Utils =    makeIdempotent: (func) ->      (args...) -> ([previousFunc, func] = [func, null])[0]? args... +  monitorChromeStorage: (key, setter) -> +    # NOTE: "?" here for the tests. +    chrome?.storage.local.get key, (obj) => +      setter obj[key] if obj[key]? +      chrome.storage.onChanged.addListener (changes, area) => +        setter changes[key].newValue if changes[key]?.newValue? +  # Utility for parsing and using the custom search-engine configuration.  We re-use the previous parse if the  # search-engine configuration is unchanged.  SearchEngines =  | 
