mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2026-01-02 20:34:41 +03:00
Accept custom ua string input while construct
This commit is contained in:
@@ -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(){
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user