Skip to content

Instantly share code, notes, and snippets.

@msiemens
Created August 8, 2012 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msiemens/3296398 to your computer and use it in GitHub Desktop.
Save msiemens/3296398 to your computer and use it in GitHub Desktop.
Single Line Flash Detection in Javascript
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