/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.js :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: edbernar { if (userInfo == null) { pageRenderer.changePage('homePage'); return ; } if (typeof(user) != 'string') history.replaceState({}, document.title, window.location.pathname + '/' + userInfo.username); username.innerText = userInfo.username + ' (status not implemented)'; pfp.style.backgroundImage = `url("${userInfo.pfp}")` pfp.style.backgroundSize = "cover"; pfp.style.backgroundRepeat = "no-repeat"; banner.style.backgroundImage = `url("${userInfo.banner}")` banner.style.backgroundSize = "cover"; banner.style.backgroundRepeat = "no-repeat"; if (userInfo.id == userMeInfo.id) { pfp.innerHTML = `
` banner.innerHTML = `` } if (userInfo.id != userMeInfo.id) { convButton.addEventListener('click', () => { showChatMenu(); showPrivateChat({id: userInfo.id, name: userInfo.username}); }); } else convButton.remove(); }); } static dispose() { LiveChat.dispose(); } } export { ProfilPage };