Skip to content

Instantly share code, notes, and snippets.

@orip
Created June 26, 2012 12:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orip/2995486 to your computer and use it in GitHub Desktop.
Save orip/2995486 to your computer and use it in GitHub Desktop.
Dump JSON describing android bugs on BugSense
console.log(JSON.stringify($('#error-sum-table .e').map(function(i, x) {
var $x = $(x);
var message = $x.find('.error-name').text().trim();
var count = parseInt($x.find('.counter').text().trim());
var filegroups = $x.find('.class-file').text().trim().match(/File: ([^ ]*)/);
var appvers = $x.find('.app_version').map(function(i, x) {
return $(x).text().trim();
});
var bugid = $x.find('.middle').data('id');
return {
message: message,
count: count,
file: filegroups[1],
versions: appvers.toArray(),
bugid: bugid
};
}).toArray()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment