Last active
March 11, 2016 18:49
-
-
Save jalex19100/0622422977de1aead689 to your computer and use it in GitHub Desktop.
Twitter cleanup
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 Remove Twitter Inline Images | |
| // @namespace fixTheTwittersNet | |
| // @version 0.2 | |
| // @include /^https?://www\.twitter\.com/.*$/ | |
| // @include /^https?://twitter\.com/.*$/ | |
| // @author This dude | |
| // @description This script removes inline images until you click the expand button | |
| // ==/UserScript== | |
| /* jshint -W097 */ | |
| 'use strict'; | |
| function addGlobalStyle(css) { | |
| var head, style; | |
| head = document.getElementsByTagName('head')[0]; | |
| if (!head) { return; } | |
| style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| style.innerHTML = css; | |
| head.appendChild(style); | |
| } | |
| //addGlobalStyle('.stream-item .cards-media-container { display: none !important; }'); | |
| //addGlobalStyle('.stream-item.open .cards-media-container { display: block !important; }'); | |
| //addGlobalStyle('.stream-item .expanded-content { display: none !important; }'); | |
| //addGlobalStyle('.stream-item.open .expanded-content { display: block !important; }'); | |
| //document.getElementsByTagName('AdaptiveMedia.is-square') | |
| addGlobalStyle('.stream-item .AdaptiveMedia { display: none !important; }'); | |
| addGlobalStyle('.stream-item.open .AdaptiveMedia { display: block !important; }'); | |
| addGlobalStyle('.stream-item .js-media-container { display: none !important; }'); | |
| addGlobalStyle('.stream-item.open .js-media-container { display: block !important; }'); | |
| addGlobalStyle('.dashboard-right { display: none !important; }'); | |
| addGlobalStyle('.dashboard-left { display: none !important; }'); | |
| addGlobalStyle('.avatar { display: none !important; }'); | |
| addGlobalStyle('.stream-item .expanded-content { display: none !important; }'); | |
| addGlobalStyle('.stream-item.open .expanded-content { display: block !important; }'); | |
| document.getElementsByClassName("content-main")[0].removeAttribute("class"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment