Now that Nitter is dead, the rules become much more complicated, because the only remaining mirror with nontrivial uptime does not preserve the same path structure as Twitter. Import these into uBlock Origin Lite to not get aids. Of course if you're using the legacy MV2 uBlock Origin this will not work as redirection is explicitly out of scope for ideological reasons. These two rules should account for any correctly-formed URL you're likely to find outside of Twitter itself, after being normalized by Twitter itself in some cases. Except a direct image link which does not need a mirror anyway. You should be able to use these rules to figure it out yourself if you care about directly navigating to the media tab or such. I tried to use AI to code review but it kept spitting out over-enumerating unreadable slop so if you find bugs with these say something in this thread. The first filter simply captures the username from a user feed URL and puts you on the user feed URL on the mirror. The second captures the tweet ID from a tweet URL and puts you on the correct tweet ID on the mirror. The second capturing group on the tweet filter is an ugly cludge in case you run into a rare URL that uses /photo/ which the mirror won't ingest properly. The mirror will transparently handle any junk query or tracking parameters.
[
{
"condition": {
"regexFilter": "https://x\\.com/([^/]*)$",
"resourceTypes": [
"main_frame"
]
},
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "https://twitterwebviewer.com/?user=\\1"
}
},
"id": 1
},
{
"condition": {
"regexFilter": "https://x\\.com/[^/]+/status/([^/]+)(.*)",
"resourceTypes": [
"main_frame"
]
},
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "https://twitterwebviewer.com/?tweet=\\1"
}
},
"id": 2
}
]