Skip to content

Commit 63ff021

Browse files
committed
fix profile page
1 parent 301b0b2 commit 63ff021

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

profile.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,6 @@ <h2 class="info-title">Account Details</h2>
573573
document.getElementById('profile-bio').textContent = 'This account is private';
574574
document.getElementById('profile-pronouns').style.display = 'none';
575575

576-
document.getElementById('profile-banner').style.display = 'none';
577-
578576
document.getElementById('followers-count').textContent = '•';
579577
document.getElementById('following-count').textContent = '•';
580578
document.getElementById('credits-count').textContent = '•';
@@ -590,18 +588,14 @@ <h2 class="info-title">Account Details</h2>
590588
if (data.banner && !data.banner.includes('3x1')) {
591589
const bannerImg = new Image();
592590
bannerImg.onload = function () {
593-
if (this.width > 10 && this.height > 10) {
594-
document.getElementById('profile-banner').style.backgroundImage = `url('${data.banner}')`;
595-
} else {
596-
document.getElementById('profile-banner').style.display = 'none';
597-
}
591+
// Always set the banner image if it loads successfully, regardless of size
592+
document.getElementById('profile-banner').style.backgroundImage = `url('${data.banner}')`;
598593
};
599594
bannerImg.onerror = function () {
600-
document.getElementById('profile-banner').style.display = 'none';
595+
// Keep the banner element visible even if image fails to load
596+
console.log('Banner image failed to load');
601597
};
602598
bannerImg.src = data.banner;
603-
} else {
604-
document.getElementById('profile-banner').style.display = 'none';
605599
}
606600

607601
if (data.bio) {

0 commit comments

Comments
 (0)