browser detection
This commit is contained in:
parent
62e6c0d84c
commit
eacecd83fb
2 changed files with 20 additions and 9 deletions
|
@ -44,9 +44,14 @@ $(function() {
|
|||
userAgent = name;
|
||||
return false;
|
||||
}
|
||||
if (!userAgent && navigator.userAgent.indexOf('Gecko') > -1)
|
||||
userAgent = 'Firefox';
|
||||
}
|
||||
});
|
||||
if (!userAgent && $.browser.mozilla) {
|
||||
userAgent = 'Firefox';
|
||||
}
|
||||
if (!userAgent && $.browser.webkit) {
|
||||
userAgent = 'Chrome';
|
||||
}
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,9 +98,9 @@ requires
|
|||
_$elements = $elements;
|
||||
|
||||
$(function() {
|
||||
$window = $(window),
|
||||
$document = $(document),
|
||||
$body = $('body'),
|
||||
$window = $(window);
|
||||
$document = $(document);
|
||||
$body = $('body');
|
||||
Ox.theme(oxui.defaultTheme);
|
||||
});
|
||||
|
||||
|
@ -153,6 +153,12 @@ requires
|
|||
return false;
|
||||
}
|
||||
});
|
||||
if (!userAgent && $.browser.mozilla) {
|
||||
userAgent = 'Firefox';
|
||||
}
|
||||
if (!userAgent && $.browser.webkit) {
|
||||
userAgent = 'Chrome';
|
||||
}
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
|
@ -248,7 +254,7 @@ requires
|
|||
};
|
||||
});
|
||||
that.api.init(getUserData(), function(result) {
|
||||
config = result.data.config,
|
||||
config = result.data.config;
|
||||
user = result.data.user;
|
||||
document.title = config.site.name;
|
||||
launchCallback();
|
||||
|
@ -524,7 +530,7 @@ requires
|
|||
keys.push(keyNames[event.keyCode]);
|
||||
}
|
||||
key = keys.join('_');
|
||||
if (key.match(/^[\w\d-]$|SPACE/)) {
|
||||
if (key.match(/^[\w\d\-]$|SPACE/)) {
|
||||
time = Ox.getTime();
|
||||
if (time - bufferTime > bufferTimeout) {
|
||||
buffer = '';
|
||||
|
@ -586,10 +592,10 @@ requires
|
|||
if (arguments[0](req)) {
|
||||
delete requests[id];
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
// cancel by id
|
||||
delete requests[arguments[0]]
|
||||
delete requests[arguments[0]];
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue