diff --git a/src/js/account/login.js b/src/js/account/login.js
index a348df4..fc2887e 100644
--- a/src/js/account/login.js
+++ b/src/js/account/login.js
@@ -37,7 +37,7 @@ export function logIn() {
const loginModal = document.getElementById('loginModal');
loginModal.parentElement.removeChild(loginModal);
triggerLoginChanges();
- addMessage(`Welcome${window.account.publicName !== '' ? ', ' + window.account.publicName : ''}! You are logged in.`);
+ addMessage(`Welcome${window.account.publicName !== '' ? ', ' + window.account.publicName : ''}! You are logged in.`, 0);
syncDictionary();
}
}).catch(err => console.error(err));
@@ -106,7 +106,7 @@ export function createAccount() {
loginModal.parentElement.removeChild(loginModal);
triggerLoginChanges();
addMessage('Account Created Successfully!');
- addMessage(`Welcome${publicName !== '' ? ', ' + publicName : ''}! You are logged in.`);
+ addMessage(`Welcome${publicName !== '' ? ', ' + publicName : ''}! You are logged in.`, 0);
if (window.currentDictionary.hasOwnProperty('externalID')) {
// Ensure dictionary uploads to overwrite the auto-created default dictionary
delete window.currentDictionary.externalID;
@@ -125,7 +125,7 @@ export function validateToken() {
}, userData => {
window.account = userData;
triggerLoginChanges();
- addMessage(`Welcome${window.account.publicName !== '' ? ', ' + window.account.publicName : ''}! You are logged in.`, 10000);
+ addMessage(`Welcome${window.account.publicName !== '' ? ', ' + window.account.publicName : ''}! You are logged in.`, 0);
syncDictionary();
}, error => {
addMessage(error + '. Logging Out.', undefined, 'error');
diff --git a/src/js/utilities.js b/src/js/utilities.js
index bfc072a..663a4fb 100644
--- a/src/js/utilities.js
+++ b/src/js/utilities.js
@@ -149,7 +149,9 @@ export function addMessage(messageText, time = 5000, extraClass = false) {
};
closeButton.addEventListener('click', closeMessage);
- setTimeout(closeMessage, time);
+ if (time > 0) {
+ setTimeout(closeMessage, time);
+ }
}
export function hideAllModals() {
diff --git a/src/js/wordManagement.js b/src/js/wordManagement.js
index 958e3aa..faad17b 100644
--- a/src/js/wordManagement.js
+++ b/src/js/wordManagement.js
@@ -84,7 +84,7 @@ export function addWord(word, render = true, message = true, upload = true) {
word.createdOn = timestamp;
window.currentDictionary.words.push(word);
if (message) {
- addMessage(`${word.name} Created Successfully`, 10000);
+ addMessage(`${word.name} Created Successfully`, 30000);
}
sortWords(render);