I've created a TOC script in javascript for Instiki, similar to how MediaWiki does theirs. It runs through the page
after it's loaded, snarfs up all of the h* elements, gives them a numbered identifier, and generates a hierarchical
table of contents.
As the script was designed to be bolted-on, and there are simple, clear instruction steps included, I have not submitted
this as a patch, but rather just the script itself. Also, making it a javascript monkey-patch took about 1/10 of the
time it would have taken me to do in ruby on the server.
You're more than welcome to do whatever you want with it. |