diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b199923a..83400867 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -404,6 +404,8 @@ "block_sure_desc": { "message": "They will not be able to follow you or view your Tweets, and you will not see Tweets or notifications from @$SCREEN_NAME$.", "placeholders": { "screen_name": { "content": "CoolPerson2000" } } }, "blocked_by_user" : { "message": "@$SCREEN_NAME$ blocked you", "placeholders": { "screen_name": { "content": "CoolPerson2000" } } }, "why_you_cant_see_block_user": { "message": "You can't follow or see @$SCREEN_NAME$'s Tweets.", "placeholders": { "screen_name": { "content": "CoolPerson2000" } } }, + "nonexistent_user": { "message": "This account doesn't exist" }, + "nonexistent_user_desc": { "message": "Try searching for another." }, "you_blocked_user": { "message": "You blocked @$SCREEN_NAME$", "placeholders": { "screen_name": { "content": "CoolPerson2000" } } }, "do_you_want_see_blocked_user": { "message": "Are you sure you want to view these Tweets? Viewing Tweets won't unblock @$SCREEN_NAME$.", "placeholders": { "screen_name": { "content": "CoolPerson2000" } } }, "I_want_see_blocked_user": { "message": "Yes, view profile" }, diff --git a/layouts/header/script.js b/layouts/header/script.js index a00028f2..fbec18e1 100644 --- a/layouts/header/script.js +++ b/layouts/header/script.js @@ -3007,7 +3007,7 @@ setInterval(() => { userDataFunction(u); }); } - }, 1750); + }, 0); // fixes a bug where user info doesn't load on the profile page occasionally setTimeout(() => { let version = document.getElementById('oldtwitter-version'); let version2 = document.getElementById('oldtwitter-version-left'); diff --git a/layouts/profile/script.js b/layouts/profile/script.js index 322b823c..de4733ca 100644 --- a/layouts/profile/script.js +++ b/layouts/profile/script.js @@ -196,13 +196,17 @@ function updateUserData() { API.user.get(user_handle, false), API.account.verifyCredentials() ]).catch(e => { + if(String(e).includes("reading 'result'")) { + document.getElementById('loading-box').hidden = true; + document.getElementById('profile-name').innerText = `@${user_handle}`; + document.getElementById('timeline').innerHTML = html`
${LOC.nonexistent_user_desc.message.replaceAll("$SCREEN_NAME$",pageUser.screen_name)}
${LOC.nonexistent_user_desc.message.replaceAll("$SCREEN_NAME$",pageUser.screen_name)}