mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 08:28:47 +03:00
This commit is contained in:
commit
0e0c926996
9
dist/ua-parser.min.js
vendored
9
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/ua-parser.pack.js
vendored
9
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
@ -48,12 +48,15 @@
|
|||||||
|
|
||||||
var util = {
|
var util = {
|
||||||
extend : function (regexes, extensions) {
|
extend : function (regexes, extensions) {
|
||||||
for (var i in extensions) {
|
var margedRegexes = {};
|
||||||
if ("browser cpu device engine os".indexOf(i) !== -1 && extensions[i].length % 2 === 0) {
|
for (var i in regexes) {
|
||||||
regexes[i] = extensions[i].concat(regexes[i]);
|
if (extensions[i] && extensions[i].length % 2 === 0) {
|
||||||
|
margedRegexes[i] = extensions[i].concat(regexes[i]);
|
||||||
|
} else {
|
||||||
|
margedRegexes[i] = regexes[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return regexes;
|
return margedRegexes;
|
||||||
},
|
},
|
||||||
has : function (str1, str2) {
|
has : function (str1, str2) {
|
||||||
if (typeof str1 === "string") {
|
if (typeof str1 === "string") {
|
||||||
@ -818,7 +821,6 @@
|
|||||||
ua = uastring;
|
ua = uastring;
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
this.setUA(ua);
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -867,7 +869,7 @@
|
|||||||
} else {
|
} else {
|
||||||
// requirejs env (optional)
|
// requirejs env (optional)
|
||||||
if (typeof(define) === FUNC_TYPE && define.amd) {
|
if (typeof(define) === FUNC_TYPE && define.amd) {
|
||||||
define(function () {
|
define("ua-parser-js", [], function () {
|
||||||
return UAParser;
|
return UAParser;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user