lewisdale.dev/src/blog/posts/2023/4/quick-snippet-detect-who-pays-for-twitter.md
2023-12-26 14:35:09 +00:00

26 lines
995 B
Markdown

---
title: "Quick snippet: Detect who pays for Twitter"
date: 2023-04-03T13:43:30
slug: quick-snippet-detect-who-pays-for-twitter
---
Even though Twitter may have tried to disguise who pays for Blue, and who has a legacy verified account, they left the `ld-json` fields intact.
Here's a quick script you can use an in an Arc boost to check for the field and colour the checkmark Red if they pay:
```javascript
setTimeout(() => {
const ldJson = document.querySelector('[type="application/ld+json"]')
const icons = document.querySelectorAll('[data-testid="icon-verified"]')
const profile = JSON.parse(ldJson.textContent);
if (icons && profile.author.disambiguatingDescription !== "verified") {
icons.forEach(i => i.style.color = 'red')
}
}, 1000)
```
I don't imagine it'll work for too long, but it's a stopgap until they remove legacy ticks completely and you can just block Blue subscribers on sight.
**Edit:** Well, this just became a lot easier I suppose