Skip to content

Commit

Permalink
fix: nft profile for twitter
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinkassis authored and pavanjoshi914 committed Jan 9, 2024
1 parent 6aef498 commit 23cac3c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/extension/content-script/batteries/Twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ function getUserData(username: string) {
const element = document.querySelector(
'[data-testid="primaryColumn"] [data-testid="UserDescription"]'
);
const imageUrl = document.querySelector<HTMLImageElement>(
`[data-testid="primaryColumn"] a[href="/${username}/photo" i] img`
)?.src;
const imageUrl = document.querySelectorAll<HTMLImageElement>(
`[data-testid="primaryColumn"] a[href="/${username}/photo" i] img,
[data-testid="primaryColumn"] a[href="/${username}/nft" i] img` // for nft profile
)?.[0].src;

const location = document.querySelector<HTMLElement>(
`[data-testid="primaryColumn"] [data-testid="UserLocation"]`
);
Expand Down

0 comments on commit 23cac3c

Please sign in to comment.