Created
May 5, 2014 16:52
-
-
Save sublimecoder/a3c3ef3b7c716477916e to your computer and use it in GitHub Desktop.
Simple script for checking if the browser has flash enabled. Most often used for swapping a slide show element.
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 = false; | |
try { | |
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
if(fo) hasFlash = true; | |
}catch(e){ | |
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment