Bypass for twitter/x age verification prompt

This filter removes X/Twitter's age verification prompt by replacing the AgeVerificationPrompt text in XHR responses.

Add it to My filters:

x.com##+js(trusted-replace-xhr-response, /AgeVerificationPrompt/g, , url:/TweetDetail|TweetResultByRestId|UserTweets/ method:GET)

EDIT: I noticed that the filter above doesn't work in the user feed. It's been a while since I checked uBO's syntax, so I'm not sure why, but this approach might work better:

!#if !cap_html_filtering
x.com##+js(trusted-replace-xhr-response, /AgeVerificationPrompt/g, , url:/TweetDetail|TweetResultByRestId|UserTweets/ method:GET)
!#else
||x.com/*/TweetDetail$xhr,1p,replace=/AgeVerificationPrompt//g
||x.com/*/TweetResultByRestId$xhr,1p,replace=/AgeVerificationPrompt//g
||x.com/*/UserTweets$xhr,1p,replace=/AgeVerificationPrompt//g
!#endif

EDIT2: I take a look in uBO doc and I updated the scriptlet to use a regex in the first parameter, replacing AgeVerificationPrompt with /AgeVerificationPrompt/g and added method:GET. The scriptlet filter should now work without problems.

Tested on x.com. It removes the age verification prompt when viewing tweets marked as adult content.

NOTE: Since this relies on the current response structure and endpoint names, it may stop working if X changes either in the future.

reddit.com
u/_1Zen_ — 2 days ago