mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 00:18:45 +03:00
Fixes issue #15 - Attach UAParser to window
This commit is contained in:
parent
4f2ee98dae
commit
edcd5402a6
@ -471,14 +471,14 @@
|
||||
exports = module.exports = UAParser;
|
||||
}
|
||||
exports.UAParser = UAParser;
|
||||
} else if (typeof(define) === FUNC_TYPE && define.amd) {
|
||||
// requirejs env
|
||||
define(function() {
|
||||
return UAParser;
|
||||
});
|
||||
} else {
|
||||
// browser env
|
||||
window.UAParser = UAParser;
|
||||
// requirejs env (optional)
|
||||
if (typeof(define) === FUNC_TYPE && define.amd) {
|
||||
define(function() {
|
||||
return UAParser;
|
||||
});
|
||||
// jQuery specific (optional)
|
||||
if (typeof(window.jQuery) !== UNDEF_TYPE) {
|
||||
var $ = window.jQuery;
|
||||
|
Loading…
x
Reference in New Issue
Block a user