diff options
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`. |
