started Kick support

This commit is contained in:
Luxferre
2024-09-15 14:40:39 +03:00
parent a471474d62
commit 430d67913b
13 changed files with 305 additions and 24 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

+8 -4
View File
@@ -6,12 +6,16 @@ function esc(s) {
.replace(/"/g,'"').replace(/'/g,''')
}
/* handle Twitch and YouTube emotes */
/* handle Twitch, YouTube and Kick emotes */
function handleEmotes(text) {
var url = 'https://static-cdn.jtvnw.net/emoticons/v2/$id/default/dark/1.0'
var twurl = 'https://static-cdn.jtvnw.net/emoticons/v2/$id/default/dark/1.0'
var kickurl = 'https://files.kick.com/emotes/$id/fullsize'
/* Handle Twitch emotes coming from backends */
text = text.replace(/#EMOTE-[^\s]+#/g,
a=>'<img src="' + url.replace('$id', a.split('-')[1].slice(0,-1)) + '">')
text = text.replace(/#TWEMOTE-[^\s]+#/g,
a=>'<img src="' + twurl.replace('$id', a.split('-')[1].slice(0,-1)) + '">')
/* Handle Kick emotes coming from backends */
text = text.replace(/#KKEMOTE-[^\s]+#/g,
a=>'<img src="' + kickurl.replace('$id', a.split('-')[1].slice(0,-1)) + '">')
/* Handle YouTube emotes */
text = text.replace(/:[^\s]+:/g, a => {
if(YT_EMOTES.indexOf(a) > -1) /* found in the database */
+12
View File
@@ -93,6 +93,18 @@ html, body {
top: 2px;
}
.kk:before {
content:"";
display:inline-block;
background:url(/img/kk32.png);
height: 16px;
width: 16px;
background-size: 16px;
background-repeat no-repeat;
position: relative;
top: 2px;
}
.timestamp {
display: none !important;
margin-right: 5px