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:
parent
c55dac559d
commit
fcba955d82
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user