Skip to content

Instantly share code, notes, and snippets.

@wifeofvillon
Created February 1, 2019 03:31
Show Gist options
  • Save wifeofvillon/c01c2cbd328def944471ec3fcd96095e to your computer and use it in GitHub Desktop.
Save wifeofvillon/c01c2cbd328def944471ec3fcd96095e to your computer and use it in GitHub Desktop.
JavaScript to get commit messages / author / datetime as tsv on https://github.com/${author}/${repo}/wiki/_history
{
const rows = document.getElementsByClassName("Box-row d-flex js-wiki-history-revision");
let tsv = "";
for (key in rows) {
let row = rows[key];
let title = row.children[1].children[0].innerText;
let author = row.children[1].children[1].children[0].innerText;
let datetime = row.children[1].children[1].children[1].attributes[0].value;
// console.log(`${title}\t${author}\t${datetime}`);
tsv = `${tsv}\n${title}\t${author}\t${datetime}`;
console.log(tsv);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment