Skip to content

Instantly share code, notes, and snippets.

@salcosta
Created September 22, 2022 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salcosta/aceadcaafe272cdca5fe3b444180bf4a to your computer and use it in GitHub Desktop.
Save salcosta/aceadcaafe272cdca5fe3b444180bf4a to your computer and use it in GitHub Desktop.
Exports the current GitHub project page to a CSV format
window.open().document.write([
Array.from(document.querySelectorAll('div[class*="table-header"] div.hoverable[role="columnheader"]')).reduce((headers, header) => {
headers.push(header.innerText);
return headers;
}, []),
...Array.from(document.querySelectorAll('div[data-test-id="table-scroll-container"] div.hoverable[role="row"]')).map(row => {
return Array.from(row.querySelectorAll('div[role="gridcell"][tabindex]')).map(rowCells => rowCells.innerText);
})
].join("<br/>"));
@salcosta
Copy link
Author

Create a bookmarklet out of this for easy use...

Create Bookmark, set the URL to javascript:....this gist

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