jhfg
This commit is contained in:
@@ -273,6 +273,8 @@
|
||||
}
|
||||
|
||||
// Remove custom avatar handler (uses event delegation for dynamically added button)
|
||||
if (!window._f0ckAvatarRemoveBound) {
|
||||
window._f0ckAvatarRemoveBound = true;
|
||||
document.addEventListener('click', async (e) => {
|
||||
if (e.target.id === 'avatar-remove-btn') {
|
||||
e.target.disabled = true;
|
||||
@@ -346,6 +348,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ==== Banner File Upload Logic (with crop modal) ====
|
||||
const bannerFileInput = document.getElementById('banner-file-input');
|
||||
@@ -807,6 +810,8 @@
|
||||
}
|
||||
|
||||
// ── Edit banner position handler ─────────────────────────────────────────
|
||||
if (!window._f0ckBannerEditBound) {
|
||||
window._f0ckBannerEditBound = true;
|
||||
document.addEventListener('click', async (e) => {
|
||||
if (e.target.id === 'banner-edit-btn') {
|
||||
const preview = document.getElementById('banner-preview');
|
||||
@@ -842,8 +847,11 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ── Remove banner handler ────────────────────────────────────────────────
|
||||
if (!window._f0ckBannerRemoveBound) {
|
||||
window._f0ckBannerRemoveBound = true;
|
||||
document.addEventListener('click', async (e) => {
|
||||
if (e.target.id === 'banner-remove-btn') {
|
||||
e.target.disabled = true;
|
||||
@@ -892,6 +900,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Generic Linking Logic
|
||||
@@ -964,6 +973,8 @@
|
||||
}
|
||||
|
||||
// Unlink handler
|
||||
if (!window._f0ckUnlinkAccountBound) {
|
||||
window._f0ckUnlinkAccountBound = true;
|
||||
document.addEventListener('click', async (e) => {
|
||||
if (e.target.classList.contains('unlink-account-btn')) {
|
||||
const alias = e.target.getAttribute('data-alias');
|
||||
@@ -995,6 +1006,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (genTokenBtn) {
|
||||
genTokenBtn.addEventListener('click', async () => {
|
||||
|
||||
Reference in New Issue
Block a user