Skip to content

Instantly share code, notes, and snippets.

Avatar
🥚
can I offer you a nice egg in this trying time?

Forrest Hopkins forresthopkinsa

🥚
can I offer you a nice egg in this trying time?
View GitHub Profile
@forresthopkinsa
forresthopkinsa / bookmarklet.js
Last active Mar 28, 2022
Orca Card activity export
View bookmarklet.js
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)