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

cache user agent detection result.

This commit is contained in:
Morgan Cheng 2011-04-29 20:07:14 -07:00
parent c55dac559d
commit fcba955d82

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 {