From cde27b800631c19e37bc900d540a794129f4c08e Mon Sep 17 00:00:00 2001 From: Index Date: Thu, 4 Jul 2024 05:34:01 -0500 Subject: [PATCH] fix: fix avatar dimension toggle feature --- js/account/profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/account/profile.js b/js/account/profile.js index 8063504..c1989b2 100755 --- a/js/account/profile.js +++ b/js/account/profile.js @@ -84,9 +84,9 @@ if (Username) { const AvatarCard = document.getElementById('user-avatar-card') const ToggleButton = document.createElement('button') ToggleButton.classList = 'btn btn-primary btn-sm 3dviewtoggler isactive' - ToggleButton.style = 'position: absolute; right: 15px; margin: 10px;' + ToggleButton.style = 'position: absolute; right: 15px; margin-top: 20px;' ToggleButton.innerHTML = '' - AvatarCard.children[0].insertBefore(ToggleButton, AvatarIFrame) + AvatarCard.getElementsByClassName('position-relative')[0].insertBefore(ToggleButton, AvatarIFrame) ToggleButton.addEventListener('click', async function(){ if (ToggleButton.children[0].classList.contains('fa-image')) {