Hide Text on Twitter

Hide text from your TL to make viewing illustrations more comfortable

< 腳本Hide Text on Twitter的回應

評論:正評 - 腳本一切正常

§
發表於:2024-03-25

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.

§
發表於:2024-04-03

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.

§
發表於:2024-04-17

Fantastic edit. Thanks so much!

§
發表於:2024-05-03

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');

§
發表於:2024-05-17

Thank you again!

發表回覆

登入以回復