Greasy Fork is available in English.

Hide Text on Twitter

Hide text from your TL to make viewing illustrations more comfortable

< Opinie na Hide Text on Twitter

Ocena: Dobry - skrypt działa

§
Napisano: 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.

§
Napisano: 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.

§
Napisano: 17-04-2024

Fantastic edit. Thanks so much!

§
Napisano: 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');

§
Napisano: 17-05-2024

Thank you again!

Odpowiedz

Zaloguj się, by odpowiedzieć.