Created
December 17, 2010 13:02
-
-
Save bgerrissen/744897 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
// pluginDetection | |
// don't put this under a too global namespace object aka. "support" | |
define( [] , function () { | |
var pluginDetection = {} | |
// SILVERLIGHT | |
, getSilverlightVersion = function(){} | |
, silverlight = function ( version ) { | |
// check if any plugin exists | |
// ... code | |
// if yes, and we have a version parameter, check if version is correct | |
if ( version && version === getSilverlightVersion () ) { | |
return true; | |
} | |
} | |
// FLASH | |
// ... code | |
// mashup | |
// I tend to combine later on for easier API overview, it also minifies better than literal object notation. | |
silverlight.version = getSilverlightVersion; | |
flash.version = getFlashVersion; | |
pluginDetection.silverlight = silverlight; | |
pluginDetection.flash = flash; | |
return pluginDetection ; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment