Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'webkit-detect' of https://github.com/josh/zepto into jo…

…sh-webkit-detect
  • Loading branch information...
commit 4add077744adf357be19828e4d5bbfc744616d74 2 parents 4b0efd9 + 5ae6cf3
@madrobby authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/detect.js
View
7 src/detect.js
@@ -13,8 +13,7 @@
}
$.os = detect(navigator.userAgent);
$.__detect = detect;
- $.browser = {
- webkit: true,
- version: navigator.userAgent.match(/WebKit\/([\d.]+)/)[1]
- }
+
+ var v = navigator.userAgent.match(/WebKit\/([\d.]+)/);
+ $.browser = v ? { webkit: true, version: v[1] } : { webkit: false };
})(Zepto);
Please sign in to comment.
Something went wrong with that request. Please try again.