aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStephen Blott2014-12-19 05:42:02 +0000
committerStephen Blott2014-12-19 05:42:02 +0000
commit4d1b448511b5ce643b90b35d5693bca8b0ffcd73 (patch)
tree0b3062c7ee3502a56402fd88242b62c2bdae187b /lib
parentc972978b43b943a1ad8709992d080bedbbe12ae2 (diff)
parent226cfb8011e83e48b9c723ebc891ad0e9a7c82ec (diff)
downloadvimium-4d1b448511b5ce643b90b35d5693bca8b0ffcd73.tar.bz2
Merge branch 'mrmr1993-hide-cursor-on-scroll' into post-1.46
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.coffee5
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`.