Skip to content

Commit

Permalink
sky follower bridge compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shy1132 committed Oct 23, 2024
1 parent 18c4d0e commit 4a1e37c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions layouts/lists/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ async function renderListMembers(c) {
if(!cursor || listMembers.length === 0) end = true;
renderListData(listInfo);
let container = document.getElementById('list-members');
if (vars.extensionCompatibilityMode) container.setAttribute('data-testid', 'cellInnerDiv')
for(let i in listMembers) {
let t = listMembers[i];
appendUser(t, container);
Expand Down
2 changes: 2 additions & 0 deletions layouts/profile/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ async function updateTimeline() {
async function renderFollowing(clear = true, cursor) {
loadingFollowing = true;
let userList = document.getElementById('following-list');
if (vars.extensionCompatibilityMode) userList.setAttribute('data-testid', 'primaryColumn')
if(clear) {
if(pageUser.id_str === user.id_str) {
userList.innerHTML = html`
Expand Down Expand Up @@ -753,6 +754,7 @@ let unsaved = false;
async function renderFollowers(clear = true, cursor) {
loadingFollowers = true;
let userList = document.getElementById('followers-list');
if (vars.extensionCompatibilityMode) userList.setAttribute('data-testid', 'primaryColumn')
if(clear) {
if(pageUser.id_str === user.id_str) {
let unfollows = await new Promise(resolve => {
Expand Down
3 changes: 2 additions & 1 deletion scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,8 @@ async function appendUser(u, container, label, usernameClass = '') {
u.verified = false;
}
userElement.innerHTML = html`
<div>
<div${vars.extensionCompatibilityMode ? ' data-testid="UserCell"' : ''}>
${vars.extensionCompatibilityMode ? `<a href="/${u.screen_name}" style="display: none;"></a><a style="display: none;">${escapeHTML(u.name)}</a>` : ''}
<a href="/${u.screen_name}" class="user-item-link">
<img src="${(u.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(u.id_str) % 7}_normal.png`): u.profile_image_url_https}" alt="${u.screen_name}" class="user-item-avatar tweet-avatar" width="48" height="48">
<div class="user-item-text">
Expand Down

0 comments on commit 4a1e37c

Please sign in to comment.