Greasy Fork is available in English.
Hide text from your TL to make viewing illustrations more comfortable
< Feedback on Hide Text on Twitter
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.
Fantastic edit. Thanks so much!
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');
Thank you again!
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.