Skip to content

Instantly share code, notes, and snippets.

@jeffreytgilbert
Created April 3, 2014 17:01
Show Gist options
  • Save jeffreytgilbert/9958479 to your computer and use it in GitHub Desktop.
Save jeffreytgilbert/9958479 to your computer and use it in GitHub Desktop.
Scan over all the plugins available in a browser. Does not work under mozilla browsers who have disabled this ability.
var $$$i = 0,
$$mt = [];
while(navigator.mimeTypes[$$$i]){
$$mt.push(navigator.mimeTypes[$$$i]);
$$$i++;
}
console.table($$mt.map(function(i,v,a){
return {
'name':i.description||i.enabledPlugin.description,
'type':i.type, 'ext':i.suffixes,
'file':i.enabledPlugin.description
};
}));
@jeffreytgilbert
Copy link
Author

This should not be used for detecting browser plugins. In practice, directly reference the plugins object and ask it for the specific plugin you're looking for (IE11 and other browsers), and in IEx-IE10 write specific detection mechanisms for whatever works in those browsers (for example active x checks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment