Skip to content

Instantly share code, notes, and snippets.

@guillaumegarcia13
Last active March 19, 2018 09:46
Show Gist options
  • Save guillaumegarcia13/1ad5951c4d73c66462b2a9b09b2837a9 to your computer and use it in GitHub Desktop.
Save guillaumegarcia13/1ad5951c4d73c66462b2a9b09b2837a9 to your computer and use it in GitHub Desktop.
Hojar: advanced recording manipulation in DevTools
angular.reloadWithDebugInfo(); // https://github.com/angular/angular.js/issues/9515
// Check whether the tagged recordings are set to favourite
var dbg_hj = angular.element($(".recordings-table-container table")).scope().pageResponses()
.map(elt => {
return {
"index" : elt.index,
"id" : elt.id,
"duration" : moment.duration(elt.duration).minutes() + ':' + ('0' + moment.duration(elt.duration).seconds()).slice(-2),
"favourite": elt.favourite,
"tags" : elt.tag_names.join(', ')
}
})
.filter(elt => elt.tags.length > 0)
.filter(elt => !elt.favourite);
if (dbg_hj.length > 0) {
var fields = Object.keys(dbg_hj[0]).filter(e => e != 'favourite'); // no need for 'favourite'
console.table(dbg_hj, fields);
} else {
console.info('No non-favorite recording with tags');
}
@guillaumegarcia13
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment