Skip to content

Instantly share code, notes, and snippets.

@jasonreiche
Last active November 17, 2023 19:37
Show Gist options
  • Save jasonreiche/354815a750cf11657301b4d7e6953767 to your computer and use it in GitHub Desktop.
Save jasonreiche/354815a750cf11657301b4d7e6953767 to your computer and use it in GitHub Desktop.
Copies all the Names from the current Google Groups Membership page into the clipboard
/**
* Snippet that can be run on a Google Group membership list to get a list that can be pasted into a spreadsheet.
* Paste and then rerun on each page of members to get full list. Includes names.
*/
// Version 1
copy([...document.querySelectorAll('div[aria-label="Group Members"] > div:not(:first-child) > div > span:nth-child(1) > div[jsslot] div > div:nth-child(1) > div')].map(e=>e.innerText).join('\n'));
// Version 2
copy([...document.querySelectorAll("div[aria-label='Group Members'] > div[role='row']")].map(row => row.innerText.replaceAll("\n", "\t")).join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment