Mercurial > ec-userscripts
changeset 53:28fde586a234
Add twitter anti-crap (part 1)
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 30 Jun 2018 21:50:51 +0900 |
parents | f8c3374d862c |
children | e76b7766d5bf |
files | twitter-cleanup.user.js |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /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();