diff --git a/src/main.ts b/src/main.ts index 71e0111..8872737 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,7 +28,7 @@ async function bttv_get_url(code: string): Promise { return { code: code, - url: `https://cdn.betterttv.net/emote/${matches[0].id}/1x.${matches[0].imageType}`, + url: `//cdn.betterttv.net/emote/${matches[0].id}/1x.${matches[0].imageType}`, }; } @@ -39,7 +39,7 @@ async function get_emotes(codes: Iterable): Promise { // queue emote jobs const queue = [...codes_set].map((code) => bttv_get_url(code)); - console.log("[lmlfc-bttv] queueing", queue.length, "jobs"); + console.log("[lmlfc-bttv] queued", queue.length, "jobs"); // run const result: EmoteMap = {}; @@ -52,7 +52,7 @@ async function get_emotes(codes: Iterable): Promise { async function process_text(text: string): Promise { const matches = [...text.matchAll(emote_regex)]; - const emotes = await get_emotes(matches.map((elem) => elem[1])); + const emotes = await get_emotes(matches.map(([_, code]) => code)); for (const emote of matches.reverse()) { const [match, code] = emote;