Greasy Fork is available in English.

Hide Text on Twitter

Hide text from your TL to make viewing illustrations more comfortable

< Feedback on Hide Text on Twitter

Review: Good - script works

§
Posted: 25-03-2024

Great script!
I edited the line 42 to include videos.

42 const hasMediaLink = tweet.innerHTML.includes('https://pbs.twimg.com/media/') || tweet.innerHTML.includes('videoComponent');

Links with cards can be included with

42 const hasMediaLink = tweet.innerHTML.includes('https://pbs.twimg.com/media/') || tweet.innerHTML.includes('videoComponent') || tweet.innerHTML.includes('https://pbs.twimg.com/card_img
');

Without cards I don't know yet.

§
Posted: 03-04-2024

Image, cards and videos (line 42):
const hasMediaLink = tweet.innerHTML.includes('https://pbs.twimg.com/media/') || tweet.innerHTML.includes('videoComponent') || tweet.innerHTML.includes('card.wrapper');


For images and gifs: 'https://pbs.twimg.com/media/' or 'tweetPhoto'
Cards: 'card.wrapper'
Videos: 'videoPlayer' or 'videoComponent'

'https://pbs.twimg.com/card_img' doesn't work if the card change after interacting (ex: youtube) but 'card.wrapper' seems to work.

§
Posted: 17-04-2024

Fantastic edit. Thanks so much!

§
Posted: 03-05-2024

Another edit to include voice media: line 42
const hasMediaLink = tweet.innerHTML.includes('https://pbs.twimg.com/media/') || tweet.innerHTML.includes('videoComponent') || tweet.innerHTML.includes('card.wrapper') || tweet.innerHTML.includes('Voice post');

§
Posted: 17-05-2024

Thank you again!

Post reply

Sign in to post a reply.