mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +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
|
* 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(){
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user