Skip to content

Instantly share code, notes, and snippets.

@forresthopkinsa
Last active March 28, 2022 23:11
Show Gist options
  • Save forresthopkinsa/8c817d00dd2d8ded1ee2c3adf33272a7 to your computer and use it in GitHub Desktop.
Save forresthopkinsa/8c817d00dd2d8ded1ee2c3adf33272a7 to your computer and use it in GitHub Desktop.
Orca Card activity export
const table = document.querySelector("#resultTable tbody");
const rows = Array.from(table.children).map(({ children }) => Array.from(children).map((c) => c.innerText));
const output = rows.map(arr => arr.join(',')).join('\n');
navigator.clipboard.writeText(output);
// combined for bookmarklet:
javascript:navigator.clipboard.writeText(Array.from(document.querySelector("#resultTable tbody").children).map(r => Array.from(r.children).map(c => c.innerText)).map(a => a.join(';')).join('\n'))
// can then be pasted into e.g. Google Sheets (using semicolon delimiter paste setting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment