Mercurial > ec-userscripts
comparison twitter-cleanup.user.js @ 53:28fde586a234
Add twitter anti-crap (part 1)
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 30 Jun 2018 21:50:51 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
52:f8c3374d862c | 53:28fde586a234 |
---|---|
1 // ==UserScript== | |
2 // @name Twitter Cleanup | |
3 // @namespace https://myconan.net | |
4 // @version 1.0.0 | |
5 // @description Strip out twitter craps (no, it doesn't turn the site blank) | |
6 // @author nanaya | |
7 // @match https://www.twitter.com/* | |
8 // @match https://twitter.com/* | |
9 // @grant none | |
10 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/twitter-cleanup.user.js | |
11 // ==/UserScript== | |
12 | |
13 ;(function() { | |
14 "use strict"; | |
15 | |
16 var $ = jQuery; | |
17 var rules = []; | |
18 var i; | |
19 var styleEl; | |
20 | |
21 rules.push('[data-component-context="suggest_activity_tweet"] { display: none !important; }'); | |
22 | |
23 for (i = 0; i < rules.length; i++) { | |
24 styleEl = document.createElement('style'); | |
25 document.head.appendChild(styleEl); | |
26 styleEl.sheet.insertRule(rules[i], 0); | |
27 } | |
28 }).call(); |