diff options
author | Olivier Paroz <github@oparoz.com> | 2015-08-01 16:22:08 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-08-01 16:33:58 +0300 |
commit | 3ea1e05df91ccc1bee473cd0682e82106d4b89da (patch) | |
tree | 92e38d0271d71dd47ff8ff6d8e4d83419eb67665 /js | |
parent | e78718feb522a13870600785b564014d30823493 (diff) |
Disable SVG for IE Edge
Diffstat (limited to 'js')
-rw-r--r-- | js/galleryutility.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/galleryutility.js b/js/galleryutility.js index 53275074..c73b391a 100644 --- a/js/galleryutility.js +++ b/js/galleryutility.js @@ -21,9 +21,10 @@ // Blocking IE8 if ($('html').is('.ie8')) { return 'unsupportedIe'; - } else if (navigator.userAgent.indexOf("MSIE") > 0) { + } else if (navigator.userAgent.indexOf("MSIE") > 0) { return 'oldIe'; - } else if (!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)) { + } else if ((!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)) || + (navigator.userAgent.indexOf("Edge/") > 0)) { return 'modernIe'; } @@ -106,10 +107,10 @@ var height = Math.floor(screen.height * window.devicePixelRatio); /* Find value of longest edge. */ - var longEdge = Math.max( width, height ); + var longEdge = Math.max(width, height); /* Find the next larger image size. */ - if ( longEdge % 100 !== 0 ){ + if (longEdge % 100 !== 0) { longEdge = ( longEdge + 100 ) - ( longEdge % 100 ); } |