Created
June 2, 2017 06:51
-
-
Save bayleedev/93df8ec56e51b152d04a369c7f258395 to your computer and use it in GitHub Desktop.
A script to see who's created the most slack emojis on your team. Paste this into the console on the `customize emojis` page on slack.
This file contains hidden or 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
class Author { | |
constructor (name) { | |
this.name = name | |
this.count = 0 | |
} | |
increase () { | |
this.count++ | |
} | |
} | |
var authors = jQuery('.author_cell').map((i, el) => { | |
return jQuery(el).text().trim() | |
}).toArray().reduce((memo, name) => { | |
memo[name] = memo[name] || new Author(name) | |
memo[name].increase() | |
return memo | |
}, {}) | |
console.table(Object.values(authors)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment