Created
August 8, 2012 16:26
-
-
Save msiemens/3296398 to your computer and use it in GitHub Desktop.
Single Line Flash Detection in Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hasFlash = navigator.mimeTypes&&navigator.mimeTypes.length?Array.prototype.slice.call(navigator.mimeTypes).some(function(a){return"application/x-shockwave-flash"==a.type}):/MSIE/.test(navigator.userAgent)?eval("try{new ActiveXObject('ShockwaveFlash.ShockwaveFlash')&&!0}catch(e){!1};"):!1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment