Skip to content

Instantly share code, notes, and snippets.

@Neurogami
Created April 24, 2015 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neurogami/b7caed494206a88c2472 to your computer and use it in GitHub Desktop.
Save Neurogami/b7caed494206a88c2472 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove Twitter Trends and Recommendations
// @namespace neurogami.com
// @description Removes Twitter Trends and "who to Follow" from the Sidebar. Works, as of 10/22/12
// @include http://twitter.com/*
// @include https://twitter.com/*
// ==/UserScript==
window.setTimeout(function() {var evilDiv, thisDiv;
evilDiv = document.evaluate("//div[@data-component-term='user_recommendations']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < evilDiv.snapshotLength; i++) {
thisDiv = evilDiv.snapshotItem(i);
thisDiv.parentNode.removeChild(thisDiv);
}
var evilh, thish;
evilh = document.evaluate("//div[@class='trends-inner']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
thish = evilh.snapshotItem(0);
thish.parentNode.removeChild(thish);
}, 7000);
@Neurogami
Copy link
Author

I do not recall from where I go this. But it is handy.

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