Skip to content

Commit

Permalink
add profile avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
not-nullptr committed Jul 12, 2024
1 parent 687a051 commit 3636f12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/profile/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ function updateUserData() {
if(String(e).includes("reading 'result'")) {
document.getElementById('loading-box').hidden = true;
document.getElementById('profile-name').innerText = `@${user_handle}`;
document.getElementById("timeline").innerHTML = html`<div class="unable_load_timeline" dir="auto" style="padding: 50px;color: var(--darker-gray); font-size: 20px;"><h2>${LOC.nonexistent_user.message}</h2><p style="font-size: 15px;" href="/${pageUser.screen_name}">${LOC.nonexistent_user_desc.message.replaceAll("$SCREEN_NAME$",pageUser.screen_name)}</p></div>`;
document.getElementById('timeline').innerHTML = html`<div class="unable_load_timeline" dir="auto" style="padding: 50px;color: var(--darker-gray); font-size: 20px;"><h2>${LOC.nonexistent_user.message}</h2><p style="font-size: 15px;" href="/${pageUser.screen_name}">${LOC.nonexistent_user_desc.message.replaceAll("$SCREEN_NAME$",pageUser.screen_name)}</p></div>`;
document.getElementById('profile-avatar').src = 'moz-extension://9605be5b-b11d-4459-879e-2b65fd1d7bca/images/default_profile_images/default_profile_0_400x400.png';
return;
}
document.getElementById('loading-box').hidden = false;
Expand All @@ -226,6 +227,7 @@ function updateUserData() {
document.getElementById('profile-banner-sticky').style.backgroundColor = 'var(--background-color)';
document.getElementById('wtf').hidden = true;
document.getElementById('profile-nav').style.boxShadow = 'none';
document.getElementById('profile-avatar').src = chrome.runtime.getURL(`images/default_profile_images/default_profile_0_normal.png`);
return;
}
document.getElementById('loading-box').hidden = false;
Expand Down

0 comments on commit 3636f12

Please sign in to comment.