mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Fixed error with Kick replies
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
--error-color: #c65e5e;
|
--error-color: #c65e5e;
|
||||||
--mandatory-field-color: #c93f3f;
|
--mandatory-field-color: #c93f3f;
|
||||||
--error-text-color: #c93f3f;
|
--error-text-color: #c93f3f;
|
||||||
|
--danger-color: #c93f3f;
|
||||||
|
--blur-intensity: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -49,6 +51,10 @@ body {
|
|||||||
gap: 0.5em;
|
gap: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.setting-label {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
.setting-description {
|
.setting-description {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
@@ -59,6 +65,17 @@ body {
|
|||||||
font-weight: 200;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***************/
|
/***************/
|
||||||
|
|||||||
@@ -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() {
|
function GetCurrentTimeFormatted() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
let hours = now.getHours();
|
let hours = now.getHours();
|
||||||
|
|||||||
@@ -2303,11 +2303,11 @@ async function KickChatMessage(data) {
|
|||||||
const isReply = data.isReply;
|
const isReply = data.isReply;
|
||||||
if (isReply && showMessage) {
|
if (isReply && showMessage) {
|
||||||
const replyUser = data.reply.sender.name;
|
const replyUser = data.reply.sender.name;
|
||||||
const replyMsg = data.reply.sender.content;
|
const replyMsg = data.reply.content;
|
||||||
|
|
||||||
replyDiv.style.display = 'block';
|
replyDiv.style.display = 'block';
|
||||||
replyUserDiv.innerText = replyUser;
|
replyUserDiv.innerText = replyUser;
|
||||||
replyMsgDiv.innerHTML = replaceEmotes(replyMsg);;
|
replyMsgDiv.innerHTML = RenderKickEmotes(replyMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set timestamp
|
// Set timestamp
|
||||||
|
|||||||
Reference in New Issue
Block a user