Created
March 3, 2017 21:31
-
-
Save fortserious/01de5ab4d54653bb0e30234b96bdd35c to your computer and use it in GitHub Desktop.
twitter remove reply headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name twitter reply fixer | |
// @namespace rossdoran.com | |
// @version 0.1 | |
// @description jesus christ twitter stop making decisions | |
// @author ross doran | |
// @match https://twitter.com/* | |
// @run-at document-start | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// ==/UserScript== | |
var hideRepliesToSelf = true; // set to false if you would like to see people's usernames in threaded replies to their own tweets | |
waitForKeyElements("div.ReplyingToContextBelowAuthor", function() { | |
$("div.ReplyingToContextBelowAuthor").each(function() { | |
$(this).children().each(function() { | |
var replyname = $(this).attr("href"); | |
var tweetname = $(this).parent().parent().find(".js-user-profile-link").attr("href"); | |
if (hideRepliesToSelf && replyname && tweetname && replyname != tweetname) | |
{ | |
$(this).text($(this).text() + " ") | |
$(this).prependTo($(this).parent().parent().find(".tweet-text")) | |
} | |
}) | |
$(this).remove() | |
}) | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment