Created
April 28, 2021 02:46
-
-
Save aminmarashi/b17253f0fcbf2330ff23a23b977eba5d to your computer and use it in GitHub Desktop.
Download custom Slack emojis
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
/* | |
* Go to: https://[your workspace].slack.com/customize/emoji | |
* And open console, then paste the code: | |
* The loop will stop once it reaches the end of list of emojis | |
* then it prints the object containing the emojis, you can | |
* access the object in your console too, it is called "out" | |
*/ | |
count = 0; | |
out = {}; | |
seen = 0; | |
scroller = document.querySelector('.c-scrollbar__hider'); | |
interval = setInterval(() => { | |
scroller.scroll(0, (count++) * 1000); | |
Array.from(document.querySelectorAll('img.p-customize_emoji_list__image')).forEach((e, i) => { | |
ext = e.src.match(/\.(\w+)$/)[1]; | |
out[e.alt] = { name: e.alt, ext, src: e.src }; | |
}); | |
if (count * 1000 > scroller.scrollHeight) { | |
console.log(out); | |
clearInterval(interval); | |
} | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then you can download those in a terminal or however you like it, for example to generate a list of
wget
commands using theout
object:Or using
curl
:Simply copy-paste the output to your terminal and execute the commands.