Fixed error with Kick replies

This commit is contained in:
nutty
2026-03-26 04:32:44 +11:00
parent 69600ca74a
commit 3613f1fa7f
3 changed files with 28 additions and 2 deletions
+17
View File
@@ -15,6 +15,8 @@
--error-color: #c65e5e;
--mandatory-field-color: #c93f3f;
--error-text-color: #c93f3f;
--danger-color: #c93f3f;
--blur-intensity: 20px;
}
@@ -49,6 +51,10 @@ body {
gap: 0.5em;
}
.setting-label {
font-weight: 500;
}
.setting-description {
font-size: 0.9em;
font-weight: 100;
@@ -59,6 +65,17 @@ body {
font-weight: 200;
}
.time-pill {
background-color: #333;
color: #ccc;
border-radius: 1em;
padding: 0.2em 0.5em;
font-size: 0.8em;
font-weight: 200;
display: inline-block;
white-space: nowrap;
}
/***************/
+9
View File
@@ -159,6 +159,15 @@ async function GetPronouns(platform, username) {
}
}
function RenderKickEmotes(message) {
const emoteRegex = /\[emote:(\d+):([^\]]+)\]/g;
return message.replace(emoteRegex, (_, id, name) => {
const imgUrl = `https://files.kick.com/emotes/${id}/fullsize`;
return `<img src="${imgUrl}" alt="${name}" title="${name}" class="emote" />`;
});
}
function GetCurrentTimeFormatted() {
const now = new Date();
let hours = now.getHours();
+2 -2
View File
@@ -2303,11 +2303,11 @@ async function KickChatMessage(data) {
const isReply = data.isReply;
if (isReply && showMessage) {
const replyUser = data.reply.sender.name;
const replyMsg = data.reply.sender.content;
const replyMsg = data.reply.content;
replyDiv.style.display = 'block';
replyUserDiv.innerText = replyUser;
replyMsgDiv.innerHTML = replaceEmotes(replyMsg);;
replyMsgDiv.innerHTML = RenderKickEmotes(replyMsg);
}
// Set timestamp