Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Free Nodelet Hack: linkify nodelet headings (for pmdev)

by jdporter (Paladin)
on Jan 05, 2011 at 17:33 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-18 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found