mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08:47 +03:00
Accept custom ua string input while construct
This commit is contained in:
parent
00720c08d7
commit
145334a963
@ -7,7 +7,7 @@
|
||||
* Licensed under GPL2 http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
function uaparser(){
|
||||
function uaparser(uastring){
|
||||
|
||||
// regexp mapper
|
||||
var regxMap = function(ua){
|
||||
@ -69,7 +69,7 @@ function uaparser(){
|
||||
};
|
||||
};
|
||||
|
||||
this.ua = window.navigator.userAgent;
|
||||
this.ua = uastring || window.navigator.userAgent;
|
||||
|
||||
this.getBrowser = function(){
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user