Skip to content

Instantly share code, notes, and snippets.

@victorhqc
Created March 13, 2018 13:11
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 victorhqc/357999e0861c0ddffbe14bcf0725609c to your computer and use it in GitHub Desktop.
Save victorhqc/357999e0861c0ddffbe14bcf0725609c to your computer and use it in GitHub Desktop.
Get slack Emojis
// Go to "Customize Slack" in settings. It'll redirect you to https://[organization].slack.com/customize/emoji
// Then run this code in the web terminal.
{
let total = 0;
const contributors = Object.entries([].slice.call(document.querySelectorAll('#custom_emoji a')).reduce((prev, link) => {
total += 1;
if (!prev[link.innerText]) {
return {
...prev,
total,
[link.innerText]: 1,
};
}
return {
...prev,
total,
[link.innerText]: prev[link.innerText] + 1,
};
}, {})).sort((a, b) => a[1] >= b[1] ? -1 : 1).map(c => `${c[0]}: ${c[1]}`);
console.log('contributors', contributors);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment