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

OK, here's something to clean up reaped items somewhat from Perl News but leave them accessable. Replace the jquery URL with the right path to your copy (which you can obtain from jquery.com). The commented-out chunk of code shows how you could completely replace the title row in question rather than just twiddling its display (you also could do something similar to my other example and append them to the bottom of the enclosing table instead).

<script type="text/javascript" src="http://example.com/js/jquery-1.2.3 +.min.js"></script> <script type="text/javascript"> function pm_clean_news( ) { // Perl News node id is 23771 $( "body#id-23771 a[href*=?node_id=52855]" ).each( function( idx ) { // tr > td > this a var containing_ele = this.parentNode.parentNode; // Remove following tr $(containing_ele).next().remove(); // Change CSS properties $(containing_ele).removeClass( 'hilight' ); $(containing_ele).css( 'background-color', '#eeffee' ); $(containing_ele).css( 'margin-bottom', '5px' ); /* var reaped_title = $( "td:first-child a:first-child", containing_e +le )[0]; $(containing_ele).replaceWith( '<tr><td colspan="3"><a href="' + $(reaped_title).attr('href') + '" +>' + $(reaped_title).text() + '</a></td></tr>' ); */ }); } $(document).ready( function () { pm_clean_news(); }); </script>

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

  • Comment on Free Nodelet Hack: Re: Reaped Nodes are Cluttering up some of the Sections
  • Download Code

Replies are listed 'Best First'.
Re: Free Nodelet Hack: Re: Reaped Nodes are Cluttering up some of the Sections
by Argel (Prior) on Mar 22, 2008 at 00:35 UTC
      ++

    Thanks Fletch, this looks very promising!!