Created
November 18, 2015 19:10
-
-
Save banterability/c346601215d5a468b97c to your computer and use it in GitHub Desktop.
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
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