Guest User

Untitled

a guest
Apr 27th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. /**********************************************
  2. * Flash Player Detection (taken from sifr )
  3. **********************************************/
  4.  
  5. var hasFlash = function(){
  6.  
  7. var nRequiredVersion = 9;
  8.  
  9. if(navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1){
  10. document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + nRequiredVersion + '))) \n</script\> \n');
  11. /* If executed, the VBScript above checks for Flash and sets the hasFlash variable.
  12. If VBScript is not supported it's value will still be undefined, so we'll run it though another test
  13. This will make sure even Opera identified as IE will be tested */
  14. if(window.hasFlash != null){
  15. return window.hasFlash;
  16. };
  17. };
  18.  
  19. if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
  20. var flashDescription = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description;
  21. return parseInt(flashDescription.substr(flashDescription.indexOf(".") - 2, 2), 10) >= nRequiredVersion;
  22. };
  23.  
  24. return false;
  25. }();
Add Comment
Please, Sign In to add comment