remove deprecated jQuery.browser

This commit is contained in:
Christoph Wurst 2016-04-19 11:55:40 +02:00
parent 7186975e35
commit 59e268763c
No known key found for this signature in database
GPG Key ID: FEECD2543CA6EAF0
1 changed files with 8 additions and 4 deletions

View File

@ -1439,11 +1439,15 @@ function initCore() {
*/
moment.locale(OC.getLocale());
if ($.browser.msie || !!navigator.userAgent.match(/Trident\/7\./)) {
// for IE10+ that don't have conditional comments
// and IE11 doesn't identify as MSIE any more...
var userAgent = window.navigator.userAgent;
var msie = userAgent.indexOf('MSIE ');
var trident = userAgent.indexOf('Trident/');
var edge = userAgent.indexOf('Edge/');
if (msie > 0 || trident > 0) {
// (IE 10 or older) || IE 11
$('html').addClass('ie');
} else if (!!navigator.userAgent.match(/Edge\/12/)) {
} else if (edge > 0) {
// for edge
$('html').addClass('edge');
}