diff options
| author | Stephen Blott | 2014-12-19 05:38:29 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2014-12-19 05:40:09 +0000 | 
| commit | 226cfb8011e83e48b9c723ebc891ad0e9a7c82ec (patch) | |
| tree | 0b3062c7ee3502a56402fd88242b62c2bdae187b /lib/utils.coffee | |
| parent | 107cef3ecd0bdbcaba157b53cc3d20ff5e06b94f (diff) | |
| download | vimium-226cfb8011e83e48b9c723ebc891ad0e9a7c82ec.tar.bz2 | |
Tidy cursor hider, move haveChromeVersion to utils.
Diffstat (limited to 'lib/utils.coffee')
| -rw-r--r-- | lib/utils.coffee | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/lib/utils.coffee b/lib/utils.coffee index 57d8a488..2efb4716 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -124,6 +124,11 @@ Utils =          return 1      0 +  # True if the current Chrome version is at least the required version. +  haveChromeVersion: (required) -> +    chromeVersion = navigator.appVersion.match(/Chrome\/(.*?) /)?[1] +    chromeVersion and 0 <= Utils.compareVersions chromeVersion, required +    # Zip two (or more) arrays:    #   - Utils.zip([ [a,b], [1,2] ]) returns [ [a,1], [b,2] ]    #   - Length of result is `arrays[0].length`. | 
