Skip to content

Instantly share code, notes, and snippets.

@meyerweb
Last active January 31, 2016 22:09
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meyerweb/2f3cd10fd8fe65c43d4e to your computer and use it in GitHub Desktop.
Save meyerweb/2f3cd10fd8fe65c43d4e to your computer and use it in GitHub Desktop.
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
/* styles for collapsing media in tweets and showing an arrow to indicate their existence
but only at the top level */
ol.stream-items > .expanding-stream-item:not(.open) .OldMedia,
ol.stream-items > .expanding-stream-item:not(.open) .AdaptiveMedia {
display: none;
}
ol.stream-items > .expanding-stream-item .conversation-root > .has-content:before,
ol.stream-items > .expanding-stream-item > .has-content:before,
ol.stream-items > .js-pinned .user-pinned:before {
display: block;
position: absolute;
bottom: .65em;
right: 10px;
color: #CCD6DD;
font-size: 1.25rem;
}
ol.stream-items > .expanding-stream-item:hover > .has-content:before,
ol.stream-items > .expanding-stream-item:focus > .has-content:before,
ol.stream-items > .js-pinned:hover .user-pinned:before,
ol.stream-items > .js-pinned:focus .user-pinned:before {
color: #069;
}
ol.stream-items > .expanding-stream-item:not(.open) .conversation-root > .has-content:before,
ol.stream-items > .expanding-stream-item:not(.open) > .has-content:before,
ol.stream-items > .js-pinned .user-pinned:before {
content: '\25BE';
}
ol.stream-items > .expanding-stream-item.open .conversation-root > .has-content:before,
ol.stream-items > .expanding-stream-item.open > .has-content:before,
ol.stream-items > .js-pinned.open .user-pinned:before {
content: '\25BE';
transform: rotate(180deg);
}
/* indents followup tweets in a conversation chain in the main timeline */
ol.conversation-module li:not(.conversation-root) {padding-left: 1.5em;}
/* So long, Moments tab */
li.moments.js-moments-tab {display: none !important;}
}
@meyerweb
Copy link
Author

Based heavily on work by Craig Cook (https://twitter.com/craigcook).

@meyerweb
Copy link
Author

Updated because of course Twitter changed their class names.

@craigcook
Copy link

Updated on userstyles.org https://userstyles.org/styles/120144/twitter-hide-auto-expanded-media-updated
(Wish I could remember my password so I could update/delete the original...)

@meyerweb
Copy link
Author

Updated again, to account for threaded conversations that start with a media tweet (Twitter uses an :after to create the vertical bars to show reply threads, so I shifted it all to :before and added a selector).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment