diff options
Diffstat (limited to 'twitch.html')
| -rw-r--r-- | twitch.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/twitch.html b/twitch.html index fb65ce1..d606b48 100644 --- a/twitch.html +++ b/twitch.html @@ -10,12 +10,14 @@ </noscript> </body> + <script src="/scripts/emotes.js"></script> <script src="/scripts/chat.js"></script> <script src="/scripts/badges.js"></script> <script> let user = null; const params = {}; const badges = {}; + const emotes = {}; window.addEventListener("load", () => { for (const [k, v] of new URLSearchParams(window.location.search)) { @@ -37,6 +39,15 @@ user = json[0]; connectToChat("wss://irc-ws.chat.twitch.tv", "justinfan12345", "65432", user["login"]); getTwitchBadges(user["login"], badges); + + // adding emotes + const emotePromises = [ + () => getBetterTTVChannelEmotes(user["id"], emotes), + () => getBetterTTVGlobalEmotes(emotes) + ]; + emotePromises + .reduce((p, fn) => p.then(fn), Promise.resolve()) + .then(() => addSystemMessage("All emotes loaded")); }); }); </script> |
