Created
September 27, 2012 14:10
-
-
Save dpashkevich/3794222 to your computer and use it in GitHub Desktop.
Extracts a list of scripts included in current page (JSON-friendly)
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
// Uses ExtJS but the method names are intuitive and are present in most libraries | |
Ext.Array.map( Ext.Array.pluck(Ext.query('script'), 'src'), function(v, i) { | |
return '"' + v.slice('site.com/'.length) + '"'; | |
}).join(',\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment