Created
May 2, 2010 22:05
-
-
Save cms/387493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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