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

Presuming one loads jquery in ones free nodelet . . .

function pm_clean_reaped() { $('td.node-from-52855').each( function( idx ) { $(this.parentNode).r +emove() } ); } $(document).ready( function () { pm_clean_reaped(); } );

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

Replies are listed 'Best First'.
Re^2: Reaped Nodes are Cluttering up some of the Sections (settings)
by tye (Sage) on Mar 19, 2008 at 21:26 UTC

    I don't think you need to play CSS tricks. Just designate that you don't want to see reaped nodes of both types. These settings appear to currently be on Newest Nodes settings even though I don't believe that either of those settings are specific to Newest Nodes1.

    1 I believe it at least used to be that one impacted Newest Nodes (and Recently Active Nodes and perhaps more recently many/most/all of the "section" main pages that list root nodes of a specific type) while the other impacted the display of replies in threads. But I leave sussing out the current details of this to other members of pmdev and sitedocclan (in case the documentation isn't clear about it).

    I believe the default is "don't show reaped nodes" for both settings so if one is seeing lots of reaped nodes, one likely previously changed a setting or one has found a section that hasn't yet been "fixed" to not show reaped nodes to those who don't want to see them.

    I did look at Perl News to see a bunch of reaped nodes shown, because, as an administrator, I don't choose to have reaped nodes hidden from me. Then I turned off the above settings and refreshed and the reaped nodes were indeed gone.

    - tye        

Re^2: Reaped Nodes are Cluttering up some of the Sections
by ysth (Canon) on Mar 20, 2008 at 08:12 UTC
    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.

      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.