Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Aug 26, 2024
1 parent e0baa1e commit 306a92f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion layouts/header/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,11 @@ let userDataFunction = async user => {
return;
}
if(ids.length === 0) return;
let users = await API.user.lookup(ids);
let users = [];
for(let i = 0; i < ids.length; i += 100) {
let usersChunk = await API.user.lookup(ids.slice(i, i + 100));
users = users.concat(usersChunk);
}
search = {
topics: [],
users: users
Expand Down
2 changes: 2 additions & 0 deletions layouts/header/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ input, textarea {
color: var(--light-gray);
min-width: 130px;
z-index: 5;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}
#search-results a, .navbar-new-tweet-user-search span, .search-results-title {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Old Twitter Layout (2024)",
"description": "__MSG_ext_description__",
"version": "1.8.8",
"version": "1.8.8.2",
"manifest_version": 3,
"homepage_url": "https://github.com/dimdenGD/OldTwitter",
"background": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ const API = {
return new Promise((resolve, reject) => {
fetch(`https://api.${location.hostname}/1.1/users/show.json?${byId ? `user_id=${val}` : `screen_name=${val}`}`, {
headers: {
"authorization": OLDTWITTER_CONFIG.public_token,
"authorization": OLDTWITTER_CONFIG.oauth_key,
"x-csrf-token": OLDTWITTER_CONFIG.csrf,
"x-twitter-auth-type": "OAuth2Session",
"x-twitter-client-language": window.LANGUAGE ? window.LANGUAGE : navigator.language ? navigator.language : "en"
Expand Down

0 comments on commit 306a92f

Please sign in to comment.