Skip to content

Instantly share code, notes, and snippets.

@machour
Created August 7, 2017 13:30
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 machour/7fcadc888b47be06353337634be6dcd3 to your computer and use it in GitHub Desktop.
Save machour/7fcadc888b47be06353337634be6dcd3 to your computer and use it in GitHub Desktop.
my TamperMonkey for twitter
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://twitter.com/
// @grant none
// ==/UserScript==
(function() {
'use strict';
// STOP navigating away when I've been writing this DM forever
window.onbeforeunload = function() {
return "Are you sure you want to navigate away?";
};
// Hide tweets liked by people I'm following
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = 'li.stream-item[data-suggestion-json*=ActivityTweet] { display: none; }';
document.getElementsByTagName('head')[0].appendChild(style);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment