The scripts posted there by ikegami and tye seem redundant by now. I suspect the root node link on every sub-node came after that(!?), maybe inspired by that node.

Read ikegami's reply again. It is titled Free Nodelet Hack: Add parent & root links to nodes in 'Nodes You Wrote'. There. Nodes You Wrote. Which means it is for Super Search.

update: tye's code completed with XPath expressions to rewrite links in Perl Monks User Search:

<script type="text/javaScript"> // <!-- function xq (query) { return document.evaluate(query,document,null,XPathResult.ORDERED_N +ODE_SNAPSHOT_TYPE,null); } function xl (query) { var r = xq(query); var a = new Array; for ( var i=0 ; i < r.snapshotLength; i++ ) a.push(r.snapshotItem( +i)); return a; } if (xl("//body[@id='id-6364']")[0]) { // only for super search var list = xl("/html/body[@id='id-6364']/center/table/tbody/tr/td[ +1]/table[@id='writeups']/tbody/tr/td[2]/a"); for (var i in list) { var link = list[i]; var container = document.createElement('span'); container.innerHTML = ( '' + '<a href="' + link.href + ';_redir=root">r</a>' + ' ' + '<a href="' + link.href + ';_redir=parent">p</a>' + '&nbsp;&nbsp;' ); link.parentNode.insertBefore(container, link); } } var params= window.location.search; if( 0 <= params.indexOf( ";_redir=root" ) ) { window.location.search= "?node_id=`root_id`"; } else if( 0 <= params.indexOf( ";_redir=parent" ) ) { window.location.search= "?node_id=`parent_id`"; } else if( 0 <= params.indexOf( ";_redir=author" ) ) { window.location.search= "?node_id=`author_id`"; } --></script>

That still loads your node first, but redirects it to its parent or root node, after loading, which saves you a click.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

In reply to Re: 'Nodes you wrote' root revisited by shmem
in thread 'Nodes you wrote' root revisited by jethro

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.