From 226cfb8011e83e48b9c723ebc891ad0e9a7c82ec Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 19 Dec 2014 05:38:29 +0000 Subject: Tidy cursor hider, move haveChromeVersion to utils. --- lib/utils.coffee | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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`. -- cgit v1.2.3