Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Free Nodelet Hack: linkify nodelet headings (for pmdev)

by jdporter (Canon)
on Jan 05, 2011 at 17:33 UTC ( #880646=note: print w/replies, xml ) Need Help??


in reply to Free Nodelet freed

See Free Nodelet Freed

This will turn each of the nodelet headings (titles) into links to the corresponding nodelet code nodes. (Only pmdev members are likely to find this useful.)

function linkify_nodelet_titles() { var nodelet_head_divs = getElementsOfTagAndClass( 'div', 'nodelet_he +ad' ); var i; for ( i = 0; i < nodelet_head_divs.length; i++ ) { var spans = nodelet_head_divs[i].getElementsByTagName('span'); var j; for ( j = 0; j < spans.length; j++ ) { if ( spans[j].className == 'title' ) { var title_span = spans[j]; var a = document.createElement('a'); a.href = 'http://perlmonks.org/?node=' + title_span.innerHTML; a.innerHTML = title_span.innerHTML; title_span.removeChild(title_span.firstChild); title_span.appendChild( a ); } } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://880646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-05-13 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (134 votes). Check out past polls.

    Notices?