Last active
October 2, 2020 06:18
-
-
Save BBlackwo/6436840f3c196c4fb30d7ead95273ff6 to your computer and use it in GitHub Desktop.
Tampermonkey script to hide the WtF (Who to Follow) and Trending modules on the side of Twitter
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 Hide WtF and Trending on Twitter v2 | |
// @namespace http://twitter.com/ | |
// @version 0.1 | |
// @description Hides the WtF (Who to Follow) and Trending modules on the side. | |
// @author Benjamin Blackwood | |
// @match https://twitter.com/* | |
// @copyright 2020 Benjamin Blackwood | |
// @grant none | |
// ==/UserScript== | |
// Forked from https://greasyfork.org/en/scripts/210-hide-wtf-and-trending-on-twitter/code | |
function addGlobalStyle(css) { | |
try { | |
var elmHead, elmStyle; | |
elmHead = document.getElementsByTagName('head')[0]; | |
elmStyle = document.createElement('style'); | |
elmStyle.type = 'text/css'; | |
elmHead.appendChild(elmStyle); | |
elmStyle.innerHTML = css; | |
} catch (e) { | |
if (!document.styleSheets.length) { | |
document.createStyleSheet(); | |
} | |
document.styleSheets[0].cssText += css; | |
} | |
} | |
addGlobalStyle(` | |
[aria-label="Timeline: Trending now"]{ display: none; margin-bottom: 0px } | |
[aria-label="Who to follow"]{ display: none; margin-bottom: 0px } | |
`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment