add emoji support - but disabled.. for now
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
var neatoEmojiConverter = require('neato-emoji-converter')
|
||||
|
||||
let chat =
|
||||
{
|
||||
size: 0,
|
||||
@@ -38,9 +40,14 @@ var chatAPI =
|
||||
push: (text) => {
|
||||
let colorPositions = [];
|
||||
let colors = [];
|
||||
let chatElement = "<li>";
|
||||
|
||||
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 }
|
||||
});
|
||||
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
let colorCheck = `${text[i]}${text[i + 1]}${text[i + 2]}`;
|
||||
@@ -66,7 +73,6 @@ var chatAPI =
|
||||
|
||||
var today = new Date();
|
||||
|
||||
|
||||
if (chatElement === "<li></li>") {
|
||||
if (chat.input == null || elmnt.scrollTop == elmnt.scrollHeight - elmnt.clientHeight) {
|
||||
chat.container.append("<li>" + "[" + today.toLocaleTimeString('de-DE') + "] " + text + "</li>");
|
||||
|
||||
Reference in New Issue
Block a user