If you're a heavy user of the Twitter web client like me then you'll find the new inline preview feature extremely intrusive as it breaks up the timeline too much. If I wanted to use facebook or linkedin then I'd be using facebook or linkedin. Having said that, cards in Twitter are great and the ability to preview media before jumping off site is really cool - but it should be my choice, not have everything foisted on my timeline.
That the mobile client allows for this with a setting is even more annoying.
So here's the fix. This only works in Chrome but I'm sure an enterprising person could do something similar for Safari and Firefox using the same CSS. Pull requests to update instructions for other browsers are of course very welcome.
- Another update to get the right hooks after a bunch of code changes on the twitter side. Have now added a style so if you do select a tweet, it will pop into the permalink mode and will show you the details which feels like a more desired response (and is what happens on mobile when going from stream to tweet view).
- A new fix after Twitter have actually rationalised their code significantly in the way all media is now displayed. Makes the hooks far more simple to implement.
Download and install the stylish chrome extension
Once that is done open up the style manager and "Write a new style"
Call it whatever you want and then paste the following code into the "code" section.
.js-media-container {
display: none;
}
.AdaptiveMedia {
display: none;
}
.permalink-tweet .AdaptiveMedia {
display: block;
}
.permalink-tweet .js-media-container {
display: block;
}
In the "Applies to" section at the bottom leave it as "everything" as there is some weirdness with binding to the domain.
Save your config. Reload twitter in your browser and voila, now more annoying inline media. However you should still be able to click on "Expand" and your image preview will be there just like it always was - it's just not opened by default any more.
As a side effect, you'll stop seeing promoted tweets as well.
Thanks @ajfisher
And here is my Tampermonkey/Userscript script version