Permalink
Browse files

Merge pull request #484 from koenbok/issue/4044

Making sure jp2 doesn’t get flagged as supported on Firefox
  • Loading branch information...
edwinvanrijkom committed Mar 30, 2017
2 parents c80ec3b + 00bd8e5 commit 17d75f72096c36a8532889b5465acb52e951000a
Showing with 7 additions and 1 deletion.
  1. +7 −1 framer/Utils.coffee
View
@@ -327,6 +327,9 @@ Utils.isChrome = ->
Utils.isSafari = ->
return /Safari/.test(navigator.userAgent) and /Apple Computer/.test(navigator.vendor)
+Utils.isFirefox = ->
+ return /^Mozilla.*Firefox\/\d+\.\d+$/.test(navigator.userAgent)
+
Utils.isEdge = ->
return /Edge/.test(navigator.userAgent)
@@ -406,7 +409,10 @@ Utils.devicePixelRatio = ->
window.devicePixelRatio
Utils.isJP2Supported = ->
- return Utils.isWebKit() and not Utils.isChrome()
+ if Utils.isFirefox()
+ return false
+ else
+ return Utils.isWebKit() and not Utils.isChrome()
Utils.isWebPSupported = ->
return Utils.isChrome()

0 comments on commit 17d75f7

Please sign in to comment.