Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**********************************************
- * Flash Player Detection (taken from sifr )
- **********************************************/
- var hasFlash = function(){
- var nRequiredVersion = 9;
- if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1){
- document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + nRequiredVersion + '))) \n</script\> \n');
- /* If executed, the VBScript above checks for Flash and sets the hasFlash variable.
- If VBScript is not supported it's value will still be undefined, so we'll run it though another test
- This will make sure even Opera identified as IE will be tested */
- if(window.hasFlash != null){
- return window.hasFlash;
- };
- };
- if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
- var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
- return parseInt(flashDescription.substr(flashDescription.indexOf(".") - 2, 2), 10) >= nRequiredVersion;
- };
- return false;
- }();
Add Comment
Please, Sign In to add comment