Skip to content

Instantly share code, notes, and snippets.

@nbcchen
Created November 5, 2024 15:48
Show Gist options
  • Save nbcchen/2d961a6f56a4b4fecb2d7f1815e32481 to your computer and use it in GitHub Desktop.
Save nbcchen/2d961a6f56a4b4fecb2d7f1815e32481 to your computer and use it in GitHub Desktop.
list jenkins users
const users = Array.from($('#people > tbody').children).filter(
/**
* @param {HTMLTableRowElement} tr
*/
tr => tr.id
).map(
/**
* @param {HTMLTableRowElement} tr
*/
tr => {
const tds = Array.from(tr.children);
return {
userId: `${tds[2].querySelector('a').innerText} (${tds[1].querySelector('a').innerText})`,
lastActive: tds[3].innerHTML,
on: tds[4].querySelector('a').innerText,
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment