Created
March 13, 2018 13:11
-
-
Save victorhqc/357999e0861c0ddffbe14bcf0725609c to your computer and use it in GitHub Desktop.
Get slack Emojis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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