diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-04-19 11:55:40 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@owncloud.com> | 2016-04-19 11:55:40 +0200 |
commit | 59e268763cf69a1874482220a99e3ea0c0f5d503 (patch) | |
tree | 5961b78febfc6c95bd1e1527e8d6aa164a9fa3a8 /core/js | |
parent | 7186975e35d03312f46b27d808a98f7bc6064078 (diff) | |
download | nextcloud-server-59e268763cf69a1874482220a99e3ea0c0f5d503.tar.gz nextcloud-server-59e268763cf69a1874482220a99e3ea0c0f5d503.zip |
remove deprecated jQuery.browser
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/js.js b/core/js/js.js index 188c15c5db5..ce4bf3ee5e9 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -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'); } |