Skip to content

Instantly share code, notes, and snippets.

@STRML
Created May 10, 2012 13:51
Show Gist options
  • Save STRML/2653127 to your computer and use it in GitHub Desktop.
Save STRML/2653127 to your computer and use it in GitHub Desktop.
Simple PhantomJS file that dumps the contents of Ext.Loader
var page = require('webpage').create(),
t, address;
if (phantom.args.length === 0) {
console.log('Usage: dumpExtLoader.js <some URL>');
phantom.exit();
} else {
page.onConsoleMessage = function (msg) {
console.log(msg);
};
address = phantom.args[0];
page.open(address, function (status) {
if (status !== 'success') {
console.log('FAIL to load the address');
} else {
page.evaluate(function(){
Ext.onReady(function() {
Ext.Loader.history.forEach(function(item) {
console.log(Ext.Loader.getPath(item));
});
phantom.exit();
});
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment