started Kick support
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 884 B |
+8
-4
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user