in reply to Re: Reaped Nodes are Cluttering up some of the Sections
in thread Reaped Nodes are Cluttering up some of the Sections

As tye says, there are already options that should work to not show reaped nodes in the first place, so no javascript is required for that (and I'm not sure where your node-from-52855 came from anyway). But the OP said they do want to see reaped nodes, but not have them be as much in the way when there are many of them.
  • Comment on Re^2: Reaped Nodes are Cluttering up some of the Sections

Replies are listed 'Best First'.
Re^3: Reaped Nodes are Cluttering up some of the Sections
by Fletch (Bishop) on Mar 20, 2008 at 13:55 UTC

    Hrmm, I wonder what this user could possibly have to do with reaped nodes in the Newest Nodes listing . . . .

    At any rate that's what I use to clean Newest Nodes. I rarely if ever hit the section pages directly so it doesn't do anything there, but it cleans NN pretty well (perhaps pm_clean_nn would be a better name). If they want to actually see the expunged nodes it's a starting point (Warning: noob jquery follows . . .).

    function pm_clean_reaped() { $('td.node-from-594086').each( function( idx ) { // tbody > tr > this td var containing_ele = this.parentNode.parentNode; if( containing_ele ) { var reaped_td = $( "td.reaped", $(containing_ele) ) if( reaped_td.length == 0 ) { $(containing_ele).append( '<tr><td colspan="2" style="font-s +ize: 0.7em;" class="reaped">Reaped: </td></tr>' ); } var reaped_node_href = $( $('a', this ) ).attr('href'); $( '<a href="' + reaped_node_href + '">X</a> ' ).appendTo( $(" +td.reaped", $(containing_ele) ) ); } $(this.parentNode).remove(); } ); }

    Of course one could use this as a starting point for further filtering (e.g. modify it to take the selector to filter on and a label (and class) to use in place of "Reaped"). Update: yup, just did it; so I can now let the neenery settle to the bottom of each section.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.