Sorceress

TijnTweet

Dec 21st, 2018
163
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name TijnTweet
  3. // @namespace DT
  4. // @description Hides unwanted tweets
  5. // @include https://twitter.com/*/*
  6. // @include https://mobile.twitter.com/
  7. // @version 1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var i;
  12. var promos = document.querySelectorAll('span.promo');
  13. for(i = 0; i < promos.length; i += 1) {
  14. // promos[i].closest('.tweet').remove(); // .closest requires FF35?
  15. promos[i].parentNode.parentNode.parentNode.parentNode.parentNode.remove(); // supported from FF9
  16. }
RAW Paste Data