Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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
Domain Nodelet?
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2021-10-19 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (77 votes). Check out past polls.

    Notices?