1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Merge pull request #2 from mocheng/patch-1.

cache user agent detection result.
This commit is contained in:
Dustin Diaz 2011-04-30 08:56:51 -07:00
commit 1e649921d7

View File

@ -14,9 +14,15 @@
safari = /safari/i.test(ua) && !chrome,
opera = /opera/i.test(ua),
firefox = /firefox/i.test(ua),
gecko = /gecko\//i.test(ua);
gecko = /gecko\//i.test(ua),
info;
function bowser() {
info = info ? info : detect();
return info;
}
function detect() {
if (ie) {
return {