Accept custom ua string input while construct

This commit is contained in:
Faisalman 2012-03-05 19:01:49 +07:00
parent 00720c08d7
commit 145334a963

View File

@ -7,7 +7,7 @@
* Licensed under GPL2 http://www.gnu.org/licenses/gpl-2.0.html * Licensed under GPL2 http://www.gnu.org/licenses/gpl-2.0.html
*/ */
function uaparser(){ function uaparser(uastring){
// regexp mapper // regexp mapper
var regxMap = function(ua){ var regxMap = function(ua){
@ -69,7 +69,7 @@ function uaparser(){
}; };
}; };
this.ua = window.navigator.userAgent; this.ua = uastring || window.navigator.userAgent;
this.getBrowser = function(){ this.getBrowser = function(){