Skip to content

Commit

Permalink
flash detection
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jan 31, 2010
1 parent 0790501 commit 2034abe
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ window.Modernizr = (function(window,doc,undefined){
offlinedetection = 'offlinedetection',
websqldatabase = 'websqldatabase',
websocket = 'websocket',
flash = 'flash',

toString = Object.prototype.toString,

Expand Down Expand Up @@ -589,7 +590,18 @@ window.Modernizr = (function(window,doc,undefined){
var cache = window[applicationCache];
return !!(cache && (typeof cache.status != 'undefined') && (typeof cache.update == 'function') && (typeof cache.swapCache == 'function'));
};



// technique courtesy of Jonathan Neal
tests[flash] = function(){
try {
return !!navigator.plugins['Shockwave Flash'] || !!(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));
}
catch(e) {
return false;
}
};


// thanks to F1lt3r and lucideer
// http://github.com/Modernizr/Modernizr/issues#issue/35
Expand Down

0 comments on commit 2034abe

Please sign in to comment.