Last active
March 19, 2018 09:46
-
-
Save guillaumegarcia13/1ad5951c4d73c66462b2a9b09b2837a9 to your computer and use it in GitHub Desktop.
Hojar: advanced recording manipulation in DevTools
This file contains hidden or 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
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'); | |
} |
Author
guillaumegarcia13
commented
Mar 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment