Skip to content

Instantly share code, notes, and snippets.

@chernjie
Last active December 29, 2019 22:50
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 chernjie/7603c30a0aeb14c6871e755f96fe3fa7 to your computer and use it in GitHub Desktop.
Save chernjie/7603c30a0aeb14c6871e755f96fe3fa7 to your computer and use it in GitHub Desktop.
Printable cheatsheet for https://gitmoji.carloscuesta.me/
var table = $$('.emoji-card').map((el, i) => {
return {
emoji: el.firstChild.firstChild.innerHTML,
code: el.lastChild.firstChild.innerHTML,
description: el.lastChild.lastChild.innerHTML
};
}).reduce((table, el, i) => {
var tr = document.createElement('tr');
tr.innerHTML = '<td>' + el.emoji + '</td><td>' + el.code + '</td><td>' + el.description + '</td>';
table.appendChild(tr);
return table;
}, document.createElement('table'));
document.write(table.outerHTML);
@sketchthat
Copy link

👍

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