mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Add bowser test function.
This commit is contained in:
parent
5a3d3766b9
commit
2b80ea3105
@ -222,6 +222,17 @@
|
||||
|
||||
var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent : '')
|
||||
|
||||
bowser.test = function (browserList) {
|
||||
for (var i = 0; i < browserList.length; ++i) {
|
||||
var browserItem = browserList[i];
|
||||
if (typeof browserItem=== 'string') {
|
||||
if (browserItem in bowser) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set our detect method to the main bowser object so we can
|
||||
|
Loading…
Reference in New Issue
Block a user