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

Today I exceeded 10K reputation on Stack Overflow, and I see deleted answers. I am now faced with pages like Convert HTML to PDF in .NET where half the answers are "deleted."

Among these are many non-answers deleted by diamond moderators, and a self-deleted answer deleted on Nov 25 '09. I find this very distracting, especially in my chosen sort order of "oldest" where these deleted answers are NOT displayed at the bottom.

I wish to be able to hide deleted answers based on combinations of characteristics such as:

  • age since deletion
  • deleted-by-owner
  • deleted by diamond moderators
  • zero undelete votes

This would be a setting every user could enable for themselves.


Hera are HTML excerpts that may be useful for userscript filtering.

This shows the code that appears for a moderator deletion, as well as the date stamp.

<div class="deleted-answer-info">deleted by <a href="/users/10936/dori">Dori</a><span class="mod-flair" title="moderator">♦</span> <span title="2011-06-26 09:13:34Z" class="relativetime">Jun 26 at 9:13</span></div>

Here is the same class for deleted by owner:

<div class="deleted-answer-info">deleted by owner <span title="2009-11-25 19:12:11Z" class="relativetime">Nov 25 '09 at 19:12</span></div>
share|improve this question
1  
If you hide deleted answers with zero undelete votes, how are they ever going to get one? –  Brandon Oct 28 '11 at 14:38
    
@Brandon question updated to reflect my thinking. That would not be the only criterion for the filter. –  Mr.Wizard Oct 28 '11 at 14:42
1  
@Mr.Wizard Rather update your original question. It's almost a complete copy and paste. –  Diago Oct 28 '11 at 14:43
    
@slhck this has nothing to do with deleting anything; it is a replacement for the prior question. –  Mr.Wizard Oct 28 '11 at 14:43
    
@Diago, the diamond mod suggested I create a new one. I thought it best to listen. –  Mr.Wizard Oct 28 '11 at 14:43
1  
My apologies. I only noticed now you did this based on a moderator's recommendation. –  Diago Oct 28 '11 at 14:44
    
K guys, this is about hiding deleted answers; no need to close. –  Won't Oct 28 '11 at 15:02
    
So, you wish to be able to hide them for yourself or would this apply automatically to all people? Because I personally would like to see those kinds of deleted posts. –  slhck Oct 28 '11 at 15:08
    
@slhck: for himself, not everyone. –  Won't Oct 28 '11 at 15:12
8  
+1 AS LONG AS it's user-settable. –  Lance Roberts Oct 28 '11 at 15:42
    
You should delete the question that people are thinking this dupes, this is way better. –  Lance Roberts Oct 28 '11 at 15:45
1  
Would it be enough to just push deleted answers to the bottom regardless of sort order? –  Michael Mrozek Oct 28 '11 at 15:50
    
@MichaelMrozek - like this - meta.stackexchange.com/questions/99966/…? –  ChrisF Oct 28 '11 at 15:57
4  
Jeez, people. This is different than the OP's previous question. Or are the closers unable to understand that permanently delete != hide via user settings? –  Won't Oct 28 '11 at 16:38
    
@ChrisF Oh, yes. Good find –  Michael Mrozek Oct 28 '11 at 18:04

2 Answers 2

One of the things that I didn't like about reaching 10k was that my clean, neat interface was now cluttered with trash.

What happens when you're a 10k user who doesn't want to participate in moderation? Your experience on StackOverflow (which we moderators, 10k and diamonds, and other diligent users of SO put much effort into making so nice!) is now ruined. All the crap that is cleared out to make that experience so unique is now dumped right in your lap.

I'd suggest that there should be the ability for high-rep users to say, "thanks, but no thanks" to some of the "features" of being a high-rep user. I think that not wanting to see deleted trash would be first among them.

In other words, let the little moleyoutube link take off his spectacles so that this

trash heap

will look like this again

fairy castle

share|improve this answer
1  
    
+1 for the cartoon alone. I've never seen that one before. What company made it, or where is it from? –  Mr.Wizard Oct 28 '11 at 23:40
    
@Mr.Wizard: I added a link (if you didn't notice). I don't know off hand, I just remember it as being one of those disturbing cartoons from childhood. –  Won't Nov 1 '11 at 19:27
    
Thanks for the link, I had no idea what you were talking about before :-) –  The Unhandled Exception Nov 6 '11 at 13:39

Here's a script which hides answers deleted by their owners or by mods over 30 days ago, and hides all deleted posts which were deleted over 90 days ago:

// ==UserScript==
// @name           So Delete Me
// @namespace      http://josh.gitlin.name/javascripts
// @description    Hide deleted posts with certain characteristics
// @version        1.0
// @include        http://stackoverflow.com/*
// ==/UserScript==

var script = document.createElement("script");
script.textContent = "(" + grease.toString() + ")()";
document.body.appendChild(script);

function grease()
{
    var hidePostsOlderThan = 3 * 30 * 24 * 60 * 60 * 1000; // Rough approximation of 3 months in miliseconds
    var hideModOwnerPostsOlderThan = 1 * 30 * 24 * 60 * 60 * 1000; // Rough approximation of 3 months in miliseconds

    hideModOwnerPostsOlderThan = 5 * 60 * 60 * 1000; // 5 hours in miliseconds

    var now = new Date();

    $('div.deleted-answer').filter(function(){
        var deletedAnswerInfo= $('div.deleted-answer-info',this);
        var deletedByOwner = deletedAnswerInfo[0].innerHTML.match(/deleted by owner/);
        var deletedByMod = deletedAnswerInfo[0].innerHTML.match(/deleted by.*moderator/);

        var dateParts=$('div.deleted-answer-info span',this)[0].title.match(/([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+):([0-9]+)(.)/);

        var deletedAt = new Date(dateParts[1],parseInt(dateParts[2])-1,dateParts[3],dateParts[4],dateParts[5],dateParts[6],0);

        var deletedAge = now - deletedAt;

        return (deletedAge >= hidePostsOlderThan) || ( (deletedByOwner || deletedByMod) && deletedAge >= hideModOwnerPostsOlderThan);
    }).hide();
}

Link to install into Google Chrome / Greasemonkey

I do not have 10K so I cannot test this script thoroughly. But it seems to work with a self-deleted answer. I just reacked 10K on MSO. I'll tweak and update this script soon.

share|improve this answer
    
Find one of your own deleted answers. –  John Oct 28 '11 at 16:29
    
It works, but the thing is: The OP wants to do it based on some criteria, so it doesn't apply to all deleted answers. –  slhck Oct 28 '11 at 16:31
    
@John: I deleted this question and that's how I came up with that CSS. I just couldn't confirm it would work on other kinds of deleted answers. I have no idea what I am talking about here since I can only see my own deleted answers, which is why I said I can't confirm it works. –  The Unhandled Exception Oct 28 '11 at 18:50
    
@slhck: I know. This was the best I could do in a short timeframe. maybe someone can create a usercornscript... (I'm looking in your direction Tim Stone...) –  The Unhandled Exception Oct 28 '11 at 19:07
    
This would help a lot. Can I send you, or post somewhere, the page code for the thread in the question? –  Mr.Wizard Oct 28 '11 at 23:43
    
Sute. Edit your question with some html. –  The Unhandled Exception Oct 29 '11 at 0:54
    
(Relatve html especially e.g. owner or date or whatever you want filtered by) –  The Unhandled Exception Oct 29 '11 at 1:21
    
I updated the question. Let me know if that is helpful. –  Mr.Wizard Oct 29 '11 at 3:23
    
@Mr.Wizard That is helpful, thanks. Now, a few questions. You said you want to hide based on "age since deletion", what specifically do you want here? I'm also not clear on whether you want posts deleted by mods hidden or posts deleted by owners... or both? Finally, I can't see undelete votes, so if you could please show me how the HTML changes when there's undelete votes, then I can code for that. –  The Unhandled Exception Oct 29 '11 at 13:39
    
I couldn't find an example of undelete votes myself. Perhaps I am looking in the wrong place, or I do not have access either. By "age since deletion" I mean I don't want to see anything that was deleted more than three months ago. If something was deleted by a diamond moderator, or deleted by owner, then I don't want to see any that are older than a month. This at least would be a place to start. –  Mr.Wizard Oct 29 '11 at 14:11
    
@Mr.Wizard Done, see updated answer –  The Unhandled Exception Oct 29 '11 at 15:35
    
Have you considered adding this to Stack Apps? :) –  Chris Frederick Oct 29 '11 at 16:33
    
@Chris great idea, I think I will! Needs to be a bit more refined, probably should have a UI to enable/disable, etc. –  The Unhandled Exception Oct 29 '11 at 16:36
    
I got around to trying this, and I am sorry to say it does not appear to work as implemented. I am using Greasemonkey/Firefox7. –  Mr.Wizard Nov 6 '11 at 7:31
    
Does it just have no effect at all? Or does it hide the wrong posts / not hide enough posts? –  The Unhandled Exception Nov 6 '11 at 13:31

You must log in to answer this question.

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