Skip to content

Commit

Permalink
Merge branch 'webkit-detect' of https://github.com/josh/zepto into jo…
Browse files Browse the repository at this point in the history
…sh-webkit-detect
  • Loading branch information
madrobby committed Dec 16, 2010
2 parents 4b0efd9 + 5ae6cf3 commit 4add077
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/detect.js
Expand Up @@ -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);

0 comments on commit 4add077

Please sign in to comment.