Last active
January 18, 2016 23:51
-
-
Save mdusher/72ade832e50398aea7ad to your computer and use it in GitHub Desktop.
I hate some of the crap Twitter has put in the timeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WebTwitter++ | |
// @version 0.1 | |
// @description WebTwitter++ | |
// @author Michael Usher <[email protected]> | |
// @match *://twitter.com/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; | |
// Only apply if there is no path, so you can view details and | |
// see the tweet with thumbnails and what not. | |
if (document.location.pathname == "/") { | |
var update_css = ` | |
// Hide giant image previews | |
div.AdaptiveMedia { | |
display: none !important; | |
} | |
// Show the link to giant image previews/quoted tweets | |
.twitter-timeline-link.u-hidden { | |
display: inline-block !important; | |
} | |
// Hide the right hand side panel | |
.dashboard-right { | |
display: none !important; | |
} | |
// Hide trends | |
.Trends.module.trends { | |
display: none !important; | |
} | |
// Hide quoted tweets | |
.QuoteTweet { | |
display: none !important; | |
} | |
`; | |
var head = document.getElementsByTagName('head')[0]; | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
if (style.styleSheet) { | |
style.styleSheet.cssText = update_css; | |
} else { | |
style.appendChild(document.createTextNode(update_css)); | |
} | |
head.appendChild(style); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment