diff --git a/index.html b/index.html index 86a0773..3ab0ab5 100644 --- a/index.html +++ b/index.html @@ -14,8 +14,8 @@
-

Sending messages as {UserName} {Status}

-

~Meira's Mobile App Chat Room~

+

Sending messages as {UserName} {Status}

+

~Set your profile here~

diff --git a/js/main.js b/js/main.js index 8d6e557..5a80ee0 100644 --- a/js/main.js +++ b/js/main.js @@ -53,11 +53,14 @@ function saveProfileImageLocally() { //} function displayMessage(message) { + let curr_date = new Date(message.dateStamp); + let month = curr_date.getMonth() + 1; + let date_str = month.toString() + "/" + curr_date.getDate().toString() + "/" + curr_date.getFullYear().toString(); var messageParagraph = document.createElement("p"); if (message.sentBy == localStorage.userName){ messageParagraph.style.color = "coral"; } - messageParagraph.innerHTML = message.dateStamp + " " + message.message + " " + message.sentBy; + messageParagraph.innerHTML = date_str + " " + message.message + " " + message.sentBy; chatBox.appendChild(messageParagraph); messageParagraph.scrollIntoView(); diff --git a/profile.html b/profile.html index f6e3f05..448b2ca 100644 --- a/profile.html +++ b/profile.html @@ -13,7 +13,7 @@

-

Go Back to Chat App

+

Go Back to Chat App

Lorem ipsum dolor sit amet consectetur adipisicing elit. Deserunt numquam, consequatur eos error ducimus quisquam nam ut quasi sint adipisci sit molestiae, ad dolorum iste possimus deleniti rerum ipsum repudiandae. Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui amet a non quas blanditiis animi, unde modi aliquid voluptatem voluptatibus ipsam repudiandae ea maxime perferendis esse dolores molestias at minus?