diff options
Diffstat (limited to 'twitch.html')
| -rw-r--r-- | twitch.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/twitch.html b/twitch.html index 9adc40c..504c752 100644 --- a/twitch.html +++ b/twitch.html @@ -16,7 +16,9 @@ <script> let user = null; const params = { - "tinyemotesinstances": null + "channel": null, + "tinyemotesinstances": null, + "fetchrecentmessages": null }; const badges = {}; const emotes = {}; @@ -26,7 +28,7 @@ params[k] = v; } - if (!("channel" in params)) { + if (params.channel == null) { addSystemMessage("No channel specified!"); return; } @@ -38,7 +40,13 @@ addSystemMessage(`Channel #${params["channel"]} does not exist.`); return; } + user = json[0]; + + if (params.fetchrecentmessages != null) { + getRecentMessages(user["login"]); + } + connectToChat("wss://irc-ws.chat.twitch.tv", "justinfan12345", "65432", user["login"]); getTwitchBadges(user["login"], badges); |
