Skip to content

Instantly share code, notes, and snippets.

@davidrupp
Forked from corinna000/unsuck-twitter.js
Created September 8, 2019 13:45
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 davidrupp/c60c83d6a3a62ef54674b5393c775f8a to your computer and use it in GitHub Desktop.
Save davidrupp/c60c83d6a3a62ef54674b5393c775f8a to your computer and use it in GitHub Desktop.
Tampermonkey script to unsuck Twitter
// ==UserScript==
// @name Unsuck Twitter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://twitter.com/
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
// Your code here...
document.querySelector('.moments').remove()
var removePromoted = function () {
[].forEach.call(document.querySelectorAll("[data-disclosure-type='promoted']"), function(n) { n.remove(); })
};
removePromoted();
setInterval(removePromoted, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment