Skip to content

Instantly share code, notes, and snippets.

@fortserious
Created March 3, 2017 21:31
Show Gist options
  • Save fortserious/01de5ab4d54653bb0e30234b96bdd35c to your computer and use it in GitHub Desktop.
Save fortserious/01de5ab4d54653bb0e30234b96bdd35c to your computer and use it in GitHub Desktop.
twitter remove reply headers
// ==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