update: smileys+emojis colors + size ehancement

This commit is contained in:
xdrm-brackets 2017-12-05 22:53:37 +01:00
parent d61476d302
commit b7c307a852
2 changed files with 27 additions and 18 deletions

View File

@ -62,7 +62,7 @@
display: none; display: none;
} }
#CONTAINER.message div span span{ /* Code block */ #CONTAINER.message div span span.code{ /* Code block */
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -74,10 +74,19 @@
font-family: 'Liberation Mono'; font-family: 'Liberation Mono';
font-size: .9em; font-size: .9em;
text-anchor: end;
} }
#CONTAINER.message div span span.utf8{ /* Smileys */
font-family: 'Liberation Mono';
font-size: 1.3em;
color: #ea921f;
}
#CONTAINER.message div span span.utf8.bl{ color: #338be0; }
#CONTAINER.message div span span.utf8.br{ color: #773c22; }
#CONTAINER.message form.msg-input{ /* Message Input */ #CONTAINER.message form.msg-input{ /* Message Input */
display: block; display: block;

View File

@ -53,29 +53,29 @@ export default {
msg = msg.replace(/\[([^\]]+)\]/g, "<ins>$1</ins>"); msg = msg.replace(/\[([^\]]+)\]/g, "<ins>$1</ins>");
/* (4) Code */ /* (4) Code */
msg = msg.replace(/`([^`]+)`/g, "<span>$1</span>"); msg = msg.replace(/`([^`]+)`/g, "<span class='code'>$1</span>");
/* (3) Manage emojis /* (3) Manage emojis
---------------------------------------------------------*/ ---------------------------------------------------------*/
/* (1) Smileys */ /* (1) Smileys */
msg = msg.replace(/:D/g, '😃'); msg = msg.replace(/:D/g, "<span class='utf8'>😃</span>");
msg = msg.replace(/:\)/g, '🙂'); msg = msg.replace(/:\)/g, "<span class='utf8'>🙂</span>");
msg = msg.replace(/:B/g, '😎'); msg = msg.replace(/:B/g, "<span class='utf8'>😎</span>");
msg = msg.replace(/:3/g, '😗'); msg = msg.replace(/:3/g, "<span class='utf8'>😗</span>");
msg = msg.replace(/;\)/g, '😉'); msg = msg.replace(/;\)/g, "<span class='utf8'>😉</span>");
msg = msg.replace(/:P/g, '😋'); msg = msg.replace(/:P/g, "<span class='utf8'>😋</span>");
msg = msg.replace(/;P/g, '😜'); msg = msg.replace(/;P/g, "<span class='utf8'>😜</span>");
msg = msg.replace(/xD/g, '😆'); msg = msg.replace(/xD/g, "<span class='utf8'>😆</span>");
msg = msg.replace(/:O/ig, '😲'); msg = msg.replace(/:O/ig, "<span class='utf8'>😲</span>");
msg = msg.replace(/:S/g, '😖'); msg = msg.replace(/:S/g, "<span class='utf8'>😖</span>");
msg = msg.replace(/\^\^/g, '😊'); msg = msg.replace(/\^\^/g, "<span class='utf8'>😊</span>");
/* (2) Emojis */ /* (2) Emojis */
msg = msg.replace(/:poop:/g, '💩'); msg = msg.replace(/:poop:/g, "<span class='utf8 br'>💩</span>");
msg = msg.replace(/:fuck:/g, '🖕'); msg = msg.replace(/:fuck:/g, "<span class='utf8'>🖕</span>");
msg = msg.replace(/\+1/g, '👍'); msg = msg.replace(/\+1/g, "<span class='utf8 bl'>👍</span>");
msg = msg.replace(/-1/g, '👎'); msg = msg.replace(/-1/g, "<span class='utf8 bl'>👎</span>");
return msg; return msg;
} }