Pronouns now have color

This commit is contained in:
Luna 2021-07-28 10:44:29 -07:00
parent ba36c159fc
commit 169ee4f792

View file

@ -4,7 +4,6 @@ let username = localStorage.getItem('username');
const form = document.querySelector('form');
// SEND A MESSAGE
// GRABS MESSAGE FROM FORM & SENDS
form.addEventListener("submit", async function (event) {
event.preventDefault();
@ -31,7 +30,6 @@ form.addEventListener("submit", async function (event) {
})
//SEND MESSAGE FETCH FUNCTION
async function sendMessage() {
sendMessageInfo = { "name": username, "body": formMessage }
fetch('../api/message/send', {
@ -47,7 +45,6 @@ async function sendMessage() {
// RECIEVE MESSAGES
let messageUpdate = window.setInterval(fetchMessages, 1000);
async function fetchMessages() {
@ -66,7 +63,7 @@ async function fetchMessages() {
rightBracket = ''
space = ''
}
printText(message.user.bold().toString() + space + leftBracket.small() + message.pronouns.small().toString() + rightBracket.small() + ": " + message.body.toString());
printText(message.user.bold().toString() + space + "<i style='color:#b8d1e7'>" + leftBracket.small() + message.pronouns.small().toString() + rightBracket.small() + "</i>" + " : " + "<span style='color:#e4e4ef'>" + message.body.toString() + "</span>");
}
@ -80,7 +77,6 @@ async function fetchMessages() {
// FUNCTION TO PRINT MESSAGES IN THE CHAT BOX
function printText(text) {
let p = document.createElement("p");
const div = document.getElementById("chatbox");
@ -102,7 +98,6 @@ function loggedIn() {
loggedIn()
//MODERATION
async function modCommand() {
let action = ''
let target = ''
@ -144,5 +139,3 @@ async function sendCommand() {
}
}