Created
June 1, 2020 05:06
-
-
Save farhaanbukhsh/862040e729dfdff333106e0f8fcdded2 to your computer and use it in GitHub Desktop.
This script is a TamperMonkey script that is use to hide the Trending Now Panel. This is mostly to save yourself from the negative trends and keep your mental peace.
This file contains 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 Twitter Machine Trends | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Farhaan Bukhsh | |
// @match https://twitter.com/* | |
// @grant none | |
//// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
(new MutationObserver(check)).observe(document, {childList: true, subtree: true}); | |
function check(changes, observer) { | |
if(document.querySelector('[aria-label="Timeline: Trending now"]')) { | |
observer.disconnect(); | |
var timelineTrending = document.querySelector('[aria-label="Timeline: Trending now"]');; | |
timelineTrending.style.display="None"; | |
} | |
} | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment