What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

IMPORTANT - Read before using...

This script is not meant to be a solution for bad behavior on Stackoverflow. If you feel somebody is violating the rules of this site, please contact the proper authorities (team@stackoverflow.com).


Remove any instance of a particular user or group of uses from your Stackoverflow experience with this greasemonkey script. Just place their names in the userids array and listen as the noise decreases.

Updates:

  • Tuesday, July 14, 2009

    The script would remove any questions that were edited by anybody within your ignore-users list. This has been fixed. Additionally, avatars representing your ignored-users will be replaced with random avatars. Any remaining references to any names in your ignore-list will be replaced with 'unknown (Google),' a common title for unrecognizable users on SO. Script was not operating properly on community-wiki posts.


Submit your improvements...

var userids = ['Username 1', 'Username 2'];

(function(){
    function GM_wait() {
    	if(typeof unsafeWindow.jQuery == 'undefined') { 
    			window.setTimeout(GM_wait,100); 
    	} 
    	else { 
    			$ = unsafeWindow.jQuery; letsJQuery(); 
    	}
    }
    GM_wait();
    function letsJQuery() {
    	$.each(userids, function(){

    		$(".post-signature:contains('"+this+"')").remove();

    		$("div.answer").each(function(){
    			var paCount = $(this).find(".post-signature").length;
    			if (paCount == 0) { $(this).remove(); }
    			if (paCount == 1 && ($(this).find(".post-signature:contains('community wiki')").length == 1)) { $(this).remove(); }
    		});

    		$("a.comment-user:contains('"+this+"')").closest("tr.comment").remove();
    		$("a[rel='canonical']:contains('"+this+"')").html("unknown (Google)");

    		var randHash = "";
    		for(var i = 0; i < 4; i++) { randHash += Math.floor(Math.random()*0x100000000).toString(16); }

    		$(".user-gravatar32>a[href*='"+this.replace(/\s/g,"-").toLowerCase()+"']>img")
    		.attr("src", "http://www.gravatar.com/avatar/"+randHash+"?s=32&d=identicon&r=PG");

    	});
    }
    $(window).ajaxComplete(function() {
    	letsJQuery();
    });
})();
share|improve this question
1  
To hide questions as well add this line: $('.question-summary:contains("'+this+'")').remove(); –  wheresrhys Dec 21 '09 at 20:37
1  
great script by the way. hopefully ignore will be a stackoverflow feature eventually, but this definintely helps for now. –  wheresrhys Dec 21 '09 at 20:38
    
Thanks, this is exactly what I've been looking for. –  kekekela Aug 4 '10 at 2:18
    
Would there be any way to modify this script so that you can also ignore a user's comments that show up on your "Most Recent Responses" page? –  kekekela Aug 4 '10 at 15:54
3  
I don't suppose that something like this script would be available for Chrome? –  Jack Maney Jan 16 '12 at 22:27
    
an ignore or post rating threshold filter facility also obviates the need for moderators. the community could be allowed either collectively (post-rating filter) or individually (ignore lists) to manage their own community experience. it works well in other places. –  user1505004 Jul 17 '12 at 18:29
2  
So.....is anyone familiar enough with writing Chrome extensions to add this ability to Chrome? If not, I might have to roll up my sleeves and figure it out. –  Jack Maney Aug 10 '12 at 4:44
    
does this work on all stacks? –  user201228 May 25 '13 at 1:15
1  
how can I install this? I need it on SU to block a troll. –  user230429 Aug 5 '13 at 13:01

6 Answers 6

add the following to subscribe to the global ajax complete event to handle the comments.

$(window).ajaxComplete(function() {
    letsJQuery();
});
share|improve this answer
1  
@RSolberg darn you, got it in before me! –  Jon Erickson Jul 7 '09 at 20:46

I actually find this thread pretty offensive. I would express myself by voting "offensive", but unfortunately my ♦ means that it would delete the entire post — which isn't my intention.

Posting a script to ignore somebody by name is clearly inappropriate

Choosing to use a script to ignore any set of users is frankly blinkered; you destroy the entire context of the things you are interested in. I won't try to stop you... but... why?

Re the point (comments) about empowering "folks who can't do anything about other users"; that is ridiculous. You are all empowered; use the "flags", or e-mail the team. However, you will understand that when an intervention is required, it won't be done in theatre for your viewing pleasure. That doesn't mean that things are ignored.

Also; we all know who the target of your ire is. I've been catching up on a few hours of missed posts, and frankly his actions are not the worst of today — quite far from it. None of us are angels, but let's stay in reality.

It is also possible, upon raising a flag, that the moderators will reserve the right to assess the situation and decide that no action is appropriate at the moment. That is purely a "general policy" comment, and shouldn't be taken as an indication of any specific event (it can't be: I wasn't directly involved in today's fun).

share|improve this answer
4  
@Marc - What I was getting at in my comment is that there are folks who take up quite a bit of my time either defending actions or other things that takes away from helping others. I personally get way to wrapped up in what some users do on the site to the point where it really does take away from what I can offer to others or take in myself. I also personally think the moderators have enough on their plates (like full time jobs) and they don't need to put up with constant complaints. So at the end of the day if posts are hidden from me, I'm not adding to the problem myself... –  RSolberg Jul 7 '09 at 23:01
2  
Re writing scripts: note "I won't try to stop you" –  Marc Gravell Jul 7 '09 at 23:02
    
My e-mail details are always on my profile; feel free to e-mail either me or (perhaps better) team@stackoverflow.com with your concerns. –  Marc Gravell Jul 7 '09 at 23:07
    
The script doesn't target insults; it targets a user. Are you seriously telling me that r1 of the script isn't essentially abusive towards another user? The "translations" issue raised some flags. Those flags are being dealt with, but (as stated) not as a theatre/spectacle. Now as a separate event I have user X posting "how to completely ignore the obnoxious user Y" (paraphrasing) - tell me: what is the correct, impartial response to that? –  Marc Gravell Jul 8 '09 at 6:39
2  
I agree with Marc. If stackoverflow was a forum with offensive material it'd make sense, but at worst it's got a few language wars and that's about it. Ignore user seems a little bit of an adolescent feature –  Chris S Jul 14 '09 at 16:46
13  
Fwiw, my personal experience is that the current facilities (i.e. flagging and emailing) are not good enough for anything but the most blatant or high visibility comments. Persistent, drawn out abuse is below the radar. My core argument for this feature is that if it helps make someone's life on SO better, then why not? –  bananakata Jul 14 '09 at 18:44
7  
@annakata I totally agree. There is some small subset of users who are really making the experience less enjoyable and useful. I don't see the problem. If SO won;t address it then why not do it at the client side? –  tim Jul 22 '09 at 21:25
3  
@annakata: you've summed it up perfectly. I enjoy using both SO and meta, in general. I try to ask good questions, I try to give good answers. None of that will be affected by my ability to hide a particular user. What happens now is that I try to restrain myself from lashing out every time I see a particular user mouthing off. I can honestly say that I think it would improve the experience quite a bit to be able to hide him. –  beska Oct 21 '09 at 21:51
    
To be honest I've been here as a read only user for a while. Started answering sometime ago. But now, this is the first time (On SU) I WANT TO ignore someone because he totally piss me off. –  Shiki May 23 '10 at 5:46
2  
If you have someone constantly trolling your threads, reporting doesn't seem to do much. I like having this option so I can just ignore my personal SO stalker and not get sucked into arguing with him. –  kekekela Aug 4 '10 at 2:19
    
Marc: Who cares if the user is targeted vs. their insults. It is their actions that cause issues. So ignoring them seems victimless to me and you end up enjoying your stay on SO that much more. I also don't hold objects accountable for people's actions. –  RSolberg Feb 18 '11 at 16:35
1  
I really don't think anyone can criticize what another person is doing on their own computer to make their own experience better for themselves. They are not applying a ban to nor censoring people for everyone else to see and the person being filtered doesn't even know. So how can there be anything offensive or wrong about it? The comments against this idea are on the same level as criticizing a person for choosing to read books of one genre, but choosing to avoid another. It's personal preference, non imposing and private. What business is that of anyone else? –  Digital Architect Aug 6 '11 at 23:12
    
I personally think this is a fantastic idea. I was banned for a few days for completely losing my cool on a person that was harassing me, going through all my comment history and posting things to bother me, but as someone else mentioned here this was not obvious enough so it was under the radar. It's hard to ignore when it's constant so if I can just keep myself from seeing any of the crap that makes for a bad experience or could sucker me into a conflict that would get me in trouble, then I say amen to that. –  Digital Architect Aug 6 '11 at 23:14
4  
why should the moderators be the judge of what's offensive or disruptive TO ME. let people use the site however they like. this script is great. –  user1505004 Jul 17 '12 at 18:03
2  
@enderland: I'm very familiar with the situation you're referring to; while it's certainly very unfortunate that the moderators felt unable to handle it effectively, I disagree that ignoring the user in question would've helped matters any - indeed, this would've effectively given him license to bother new users without any oversight! Your best option as a user is to flag rude or obnoxious actions; trust me, moderators have a much easier time dealing with this stuff when there's a clear history of abuse to follow. –  Shog9 Jul 4 '13 at 19:09

I believe this XKCD comic below demonstrates perfectly why some of us need this script:

Alice: Are you coming to bed? Bob: I can't. This is important. Alice: What? Bob: Someone is *wrong* on the internet.

And even more relevant is the alttext: "What do you want me to do? LEAVE? Then they'll keep being wrong!"

share|improve this answer

To replace the user's gravatar with a random gravatar:

var randHash = "";
for(var i = 0; i < 4; i++)
  randHash += Math.floor(Math.random()*0x100000000).toString(16);
$(".user-gravatar32>a[href*='"+this.replace(/\s/g,"-").toLowerCase()+"']>img")
  .attr("src", "http://www.gravatar.com/avatar/"+randHash+"?s=32&d=identicon&r=PG");

That of course goes inside the $.each loop.

share|improve this answer
    
+1 because i didn't realize gravatar's were an encoding of anything. –  Ian Boyd Apr 14 '12 at 20:48

I feel it is the place of moderators to punish those who misuse the site and while you have every right to control what appears on your computer screen, I feel that it breaks the point of the site if you are able to block content from specific contributors.

share|improve this answer
4  
What exactly would you propose then? The site experience has been broken for some users because of what has been happening already.... –  RSolberg Jul 9 '09 at 15:26
2  
@Jonathan: Yes, I totally understand and as a temporary short-lived fix, I think it's acceptable. I just think that long term, this wouldn't be a constructive solution. The real fix is to tackle the problem as a community - it's wrong to assume that just because it's broken (in RSolberg's words), we should do anything we can to fix it on our own. Let's work together to push the scumbags out. –  Jeff Yates Jul 10 '09 at 3:36
1  
I feel it is the place of moderators to punish those who misuse the site That makes a lot of extra work which may not be necessary and could be avoided by simply ignoring it. This function lets users for whom it matters enough, to do exactly that without adding to the moderators’ queue. Plus not everything that is offensive to someone is offensive to everyone, and so might not be hidden; this lets you choose your level of sensitivity. If something is so bad that it requires moderator attention, then others will end up quickly flagging it and getting it removed. –  Synetech Sep 7 '13 at 19:38

I like playing Devil's Advocate, so I'm going to raise an issue here for discussion that I don't think has really been covered yet...

Ignoring users via a script like this could be construed as incredibly selfish, since it doesn't really assist the larger community. If there is someone on SO behaving in a manner that you truly feel is insulting or damaging to the site as a whole, why wouldn't you take action to inform or contact a moderator? Using a script to ignore people doesn't stop what they're doing. They are still doing the things you believe are damaging to the site, but you're just pretending they're not. So you're basically letting SO get abused, instead of doing the responsible thing and pointing it out.

Shouldn't people who enjoy SO be willing to give a little something back in the form of oversight and moderation, even if it means occasionally having to see things that annoy you? Problems generally don't get fixed by just turning a blind eye to them.

share|improve this answer
1  
@gnovice: I would go out on a limb and suggest that this script is a last resort for some users... The things you've talked about have been done. –  RSolberg Jul 14 '09 at 15:55
2  
@gnovice - This script is for those who have exhausted all other methods. –  Jonathan Sampson Jul 14 '09 at 16:00
    
@gnovice - you are right, but no one is doing anything about it and all attempts to resolve it are ignored/declined. So we have to do it individually. –  tim Jul 22 '09 at 21:26
1  
Maybe because you've got the "ignore flags from this guy" tag. Just because the moderators feel the behavior of people harassing you is A-OK doesn't mean you should be stuck having to put up with it. –  anon Feb 23 '11 at 23:29
2  
If there is someone on SO behaving in a manner that you truly feel is insulting or damaging to the site as a whole, why wouldn't you take action to inform or contact a moderator? It may be hurtful to a user, but not “damaging” to the site. There are lots of times where an argument or something makes someone uncomfortable but not everybody. It’s not worth getting mods involved, but that doesn’t mean users who are affected by it should have to see it. Ignoring users via a script like this could be construed as incredibly selfish That’s the point. This would let you choose. –  Synetech Sep 7 '13 at 19:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .