diff options
author | Olivier Paroz <github@oparoz.com> | 2016-03-26 13:49:22 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2016-03-26 18:13:19 +0300 |
commit | 34bd66314e6d75518c54d5e48982d5e65e01f2ed (patch) | |
tree | 459cf67dd563d1f045fbbb044f992e57ad88bd16 | |
parent | 21c8878c7bf5e395104ed2f50da594ee7e589716 (diff) |
Enable SVG rendering on Edgev15.0-stable9
That browser will generate lots of errors in the log, but it still works.
The feature is optional, so users can turn it off if it doesn't work with their media files
(cherry picked from commit 4497e2b)
-rw-r--r-- | js/galleryconfig.js | 3 | ||||
-rw-r--r-- | js/galleryutility.js | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/js/galleryconfig.js b/js/galleryconfig.js index 0dfa2982..d9ee0e76 100644 --- a/js/galleryconfig.js +++ b/js/galleryconfig.js @@ -132,7 +132,8 @@ */ _worksInCurrentBrowser: function (feature, validationRule) { var isAcceptable = true; - if (feature === validationRule && Gallery.ieVersion !== false) { + if (feature === validationRule && + (Gallery.ieVersion !== false && Gallery.ieVersion !== 'edge')) { isAcceptable = false; } diff --git a/js/galleryutility.js b/js/galleryutility.js index 98e81ec8..a337f502 100644 --- a/js/galleryutility.js +++ b/js/galleryutility.js @@ -19,7 +19,7 @@ window.Gallery = window.Gallery || {}; /** * Detects if the browser is a recent or an old version of Internet Explorer * - * @returns {string|bool} + * @returns {string|boolean} */ getIeVersion: function () { // Blocking IE8 @@ -27,9 +27,10 @@ window.Gallery = window.Gallery || {}; return 'unsupportedIe'; } else if (navigator.userAgent.indexOf("MSIE") > 0) { return 'oldIe'; - } else if ((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)) || - (navigator.userAgent.indexOf("Edge/") > 0)) { + } else if (!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)) { return 'modernIe'; + } else if (navigator.userAgent.indexOf("Edge/") > 0) { + return 'edge'; } return false; |