diff options
| author | RblSb <msrblsb@gmail.com> | 2024-01-01 07:31:02 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2024-01-01 07:31:02 +0300 |
| commit | c9b920cea600b5fbe84ad7ab0b279275243faacb (patch) | |
| tree | fada67761c471fc461402135a8688e7961d08de7 /src/client/Main.hx | |
| parent | 0d1fd0f960a64252638eb94f079c0e7747792b95 (diff) | |
Flashback time per item, improve webm/webp support
Diffstat (limited to 'src/client/Main.hx')
| -rw-r--r-- | src/client/Main.hx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx index 69450d9..b1e0eb6 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -720,7 +720,8 @@ class Main { }); } for (emote in config.emotes) { - final tag = emote.image.endsWith("mp4") ? 'video autoplay="" loop="" muted=""' : "img"; + final isVideoExt = emote.image.endsWith("mp4") || emote.image.endsWith("webm"); + final tag = isVideoExt ? 'video autoplay="" loop="" muted=""' : "img"; filters.push({ regex: new EReg("(^| )" + escapeRegExp(emote.name) + "(?!\\S)", "g"), replace: '$1<$tag class="channel-emote" src="${emote.image}" title="${emote.name}"/>' @@ -739,7 +740,8 @@ class Main { } smilesList.textContent = ""; for (emote in config.emotes) { - final tag = emote.image.endsWith("mp4") ? "video" : "img"; + final isVideoExt = emote.image.endsWith("mp4") || emote.image.endsWith("webm"); + final tag = isVideoExt ? "video" : "img"; final el = document.createElement(tag); el.className = "smile-preview"; el.dataset.src = emote.image; |
