4444444444444443333333333333

This commit is contained in:
2026-08-19 22:22:10 +02:00
parent 53417063e4
commit e793b50348
7 changed files with 43 additions and 19 deletions

View File

@@ -846,6 +846,13 @@ window.cancelAnimFrame = (function () {
if (userToggle && userMenu) {
userToggle.addEventListener('click', (e) => {
e.stopPropagation();
if (e.target.closest('.nav-avatar-img')) {
const username = window.f0ckSession?.user;
if (username) {
window.location.href = `/user/${username.toLowerCase()}`;
return;
}
}
const opening = !userMenu.classList.contains('show');
userMenu.classList.toggle('show');
userToggle.classList.toggle('is-active', opening);
@@ -9265,6 +9272,13 @@ document.addEventListener("DOMContentLoaded", function () {
var menu = document.getElementById(menuId);
if (btn && menu) {
btn.addEventListener('click', function (e) {
if (e.target.closest('.nav-avatar-img')) {
const username = window.f0ckSession?.user;
if (username) {
window.location.href = `/user/${username.toLowerCase()}`;
return;
}
}
if (window.innerWidth <= 700) {
e.preventDefault();
menu.classList.toggle('show-mobile');