Skip to content

Instantly share code, notes, and snippets.

@banterability
Created November 18, 2015 19:10
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 banterability/c346601215d5a468b97c to your computer and use it in GitHub Desktop.
Save banterability/c346601215d5a468b97c to your computer and use it in GitHub Desktop.
function flashSupported(){
if (window.ActiveXObject){
try {
new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
return true;
} catch (e) {
return false;
}
} else {
return Array.from(navigator.plugins).some(function(plugin){
return plugin.name.match(/flash/gim);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment