consolidate user agent sniffing from util.js and
core.js into a new module useragent.js
This commit is contained in:
parent
d78bb1b5ab
commit
ad19a8f98e
6 changed files with 54 additions and 95 deletions
|
|
@ -1,6 +1,6 @@
|
|||
define(function(require, exports, module) {
|
||||
|
||||
var util = require("pilot/util");
|
||||
var ua = require("pilot/useragent");
|
||||
var console = require('pilot/console');
|
||||
|
||||
// Changed to suit the specific needs of running within Skywriter
|
||||
|
|
@ -65,11 +65,11 @@ var mode = (function() {
|
|||
// functionality provided by Firebug. Firebug tries to do the right
|
||||
// thing here and break, but it happens every time you load the page.
|
||||
// bug 554105
|
||||
if (util.isMozilla) {
|
||||
if (ua.isGecko) {
|
||||
return 'firefox';
|
||||
} else if (util.isOpera) {
|
||||
} else if (ua.isOpera) {
|
||||
return 'opera';
|
||||
} else if (util.isSafari) {
|
||||
} else {
|
||||
return 'other';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue