Focus on a tweet like this:

https://twitter.com/film_girl/status/1621170813796851719

1621170813796851719

Then run this script for a screenshot:

Open screenshot-current-tweet in Script Kit

// Name: Screenshot Current Tweet
import "@johnlindquist/kit"
const { chromium }: typeof import("playwright") = await npm(
"playwright"
)
let url = await getActiveTab()
let timeout = 5000
let headless = false
const browser = await chromium.launch({
timeout,
headless,
})
const context = await browser.newContext({
colorScheme: "dark",
})
const page = await context.newPage()
page.setDefaultTimeout(timeout)
await page.goto(url)
let screenshotPath = home(
"Downloads",
path.parse(url).name + ".png"
)
try {
await page
.locator("article[tabindex='-1']")
.screenshot({ path: screenshotPath })
await revealFile(screenshotPath)
log(`Done`)
} catch (error) {
log(error)
}
await browser.close()