This works in the JS code works inside the console in FF and Chrome and will show hidden html-anchors ready to be cut&paste with PM markup
javascript:(function(){ var path = location.pathname.replace(/^\//,"").replace(/\.html$/," +"); var as =document.getElementsByTagName("a"); for (i in as) { var l = as[i]; if (l.id && l.classList.length == 0 ){ var dlink = path + "#" + l.id; l.innerHTML = "<b>" + path + "#[doc://"+dlink+"]</b><br>"; + l.href = "#" + l.id } } })()
The bold parts are generated by JS
perlintro#[doc://perlintro#Perl-variable-types]
Perl variable types
Perl has three main variable types: scalars, arrays, and hashes.
perlintro#[doc://perlintro#Scalars]
Scalars
A scalar represents a single value:
you can C&P the links then into a PM post, and they'll render as:
- perlintro#Perl variable types
- perlintro#Scalars
I still have problems putting it into a bookmark getting strange JS errors about keyword "var".
NB: This is far from being bug-free perldoc.perl.org and PM markup have their own idiosyncrasies! But it's a start.
Feel free to post better versions!!!
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
alert("LanX")
In reply to Bookmarklet to show deeplinks in perldoc.perl.org by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |