Skip to content

Instantly share code, notes, and snippets.

@dpashkevich
Created September 27, 2012 14:10
Show Gist options
  • Save dpashkevich/3794222 to your computer and use it in GitHub Desktop.
Save dpashkevich/3794222 to your computer and use it in GitHub Desktop.
Extracts a list of scripts included in current page (JSON-friendly)
// 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