Skip to content

Commit

Permalink
Fixed #43, window.detector and window.g_detector
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Mar 27, 2014
1 parent 1f1d318 commit dbd194c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,13 @@
detector = parse(userAgent + " " + appVersion + " " + vendor);
detector.parse = parse;

window.detector = detector;
window.g_detector = detector;

This comment has been minimized.

Copy link
@afc163

afc163 Mar 27, 2014

Contributor

暴露一个全局变量就够恶心的了,你这还暴露了两个。

This comment has been minimized.

Copy link
@hotoo

hotoo Mar 27, 2014

Author Owner

有问题,找玉伯 @lifesinger

历史遗留 + 最新规范。


if(typeof define === "function"){
define(function(require, exports, module){
module.exports = detector;
});
}else{
window.detector = detector;
}

})(this);

0 comments on commit dbd194c

Please sign in to comment.