From 955090ef1ecc67ce20dbc7002d6654b8e7bfe5c3 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 5 May 2017 13:05:42 +0200 Subject: [PATCH] Add Edge browser detection with 'edge' class for element Additional 'ms' class for both IE and Edge. --- program/js/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/program/js/common.js b/program/js/common.js index 088613d11..b56b30355 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -60,6 +60,7 @@ function roundcube_browser() this.webkit = this.agent_lc.indexOf('applewebkit') > 0; this.ie = (document.all && !window.opera) || (this.win && this.agent_lc.indexOf('trident/') > 0); + this.edge = this.agent_lc.indexOf('edge/') > 0; if (window.opera) { this.opera = true; // Opera < 15 @@ -108,7 +109,9 @@ function roundcube_browser() var classname = ' js'; if (this.ie) - classname += ' ie ie'+parseInt(this.vendver); + classname += ' ms ie ie'+parseInt(this.vendver); + else if (this.edge) + classname += ' ms edge'; else if (this.opera) classname += ' opera'; else if (this.konq)