maybe chat fix

This commit is contained in:
hydrant
2021-04-15 13:17:44 +02:00
parent a76ac747fd
commit 24112ef5b5
3 changed files with 7 additions and 12 deletions

View File

@@ -1,6 +1,4 @@
var neatoEmojiConverter = require('neato-emoji-converter')
let chat =
let chat =
{
size: 0,
history_limit: 50,
@@ -40,14 +38,7 @@ var chatAPI =
push: (text) => {
let colorPositions = [];
let colors = [];
let chatElement = "<li>"
var converter = new neatoEmojiConverter([replacements]);
text = converter.replaceShortcodesWith(text, function (unicodeChar, shortcode, name, object) {
if (unicodeChar) { return unicodeChar }
else if (object.url) { return `<img src="${object.url}" alt="${name}" title="${name}" style="max-height:35px; max-width:35px; width:auto; height:auto;" />` }
else { return shortcode }
});
let chatElement = "<li>";
for (let i = 0; i < text.length; i++) {
let colorCheck = `${text[i]}${text[i + 1]}${text[i + 2]}`;