Skip to content

Instantly share code, notes, and snippets.

@aboutdavid
Last active October 31, 2021 15:15
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 aboutdavid/b3d2429cf7266e444692c246445ed369 to your computer and use it in GitHub Desktop.
Save aboutdavid/b3d2429cf7266e444692c246445ed369 to your computer and use it in GitHub Desktop.
Get all emojis from twitchemotes.com
var emotes = [];
var i = 0;
var img = document.querySelectorAll("img");
var center = document.querySelectorAll("center");
while (i < img.length) {
if (!img[i].getAttribute("data-regex")) i++;
if (!center[i]) break;
emotes.push({ name: img[i].getAttribute("data-regex"), src: img[i].src });
i++;
}
// Emotes contains all of the emotes
// Do whatever you want with it.
// (c) aboutDavid 2021, MIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment