# HG changeset patch # User nanaya # Date 1530363051 -32400 # Node ID 28fde586a234cfc5bd75f3c4b9a2f1432f2c0faf # Parent f8c3374d862c03b70ba5301843f71747d7cd84e6 Add twitter anti-crap (part 1) diff -r f8c3374d862c -r 28fde586a234 twitter-cleanup.user.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/twitter-cleanup.user.js Sat Jun 30 21:50:51 2018 +0900 @@ -0,0 +1,28 @@ +// ==UserScript== +// @name Twitter Cleanup +// @namespace https://myconan.net +// @version 1.0.0 +// @description Strip out twitter craps (no, it doesn't turn the site blank) +// @author nanaya +// @match https://www.twitter.com/* +// @match https://twitter.com/* +// @grant none +// @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/twitter-cleanup.user.js +// ==/UserScript== + +;(function() { + "use strict"; + + var $ = jQuery; + var rules = []; + var i; + var styleEl; + + rules.push('[data-component-context="suggest_activity_tweet"] { display: none !important; }'); + + for (i = 0; i < rules.length; i++) { + styleEl = document.createElement('style'); + document.head.appendChild(styleEl); + styleEl.sheet.insertRule(rules[i], 0); + } +}).call();