Skip to content

Instantly share code, notes, and snippets.

@danbrianwhite
Last active December 16, 2015 03:49
Show Gist options
  • Save danbrianwhite/7d4c0b4be601ed67d30c to your computer and use it in GitHub Desktop.
Save danbrianwhite/7d4c0b4be601ed67d30c to your computer and use it in GitHub Desktop.
isFlashEnabled
function isFlashEnabled()
{
    var hasFlash = false;
    try
    {
        var flashObject = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
        if(flashObject) hasFlash = true;
    }
    catch(e)
    {
        if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true;
    }
    return hasFlash;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment