Skip to content

Instantly share code, notes, and snippets.

@cms
Created May 2, 2010 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cms/387493 to your computer and use it in GitHub Desktop.
Save cms/387493 to your computer and use it in GitHub Desktop.
(function () {
var frameworks = {
'MooTools Core': 'MooTools.version',
'MooTools More': 'MooTools.More.version',
'Base2': 'base2.version',
'Dojo': 'dojo.version',
'Ext JS': 'Ext.version',
'jQuery': 'jQuery.fn.jquery',
'jQuery UI': 'jQuery.ui.version',
'MochKit': 'MochiKit.MochiKit.VERSION',
'PrototypeJS': 'Prototype.Version',
'Script.aculo.us': 'Scriptaculous.Version',
'Yahoo UI': 'YAHOO.VERSION',
'Scripty2': 'S2.Version'
}, results = [];
for (var name in frameworks) {
if (frameworks.hasOwnProperty(name)) {
var propNames = frameworks[name].split('.'), value = this;
for (var i = 0; i < propNames.length; i++) {
value = value && value[propNames[i]];
}
if (value) {
results.push(name + '('+value+')');
}
}
}
return results;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment