digitalmars.D - Improved doc page - small change to html
- Adam Ruppe (38/38) Feb 21 2010 The Jump To: section on the phobos 2 docs could be made a lot easier
- Andrei Alexandrescu (4/11) Feb 21 2010 [snip]
- Walter Bright (2/14) Feb 21 2010 and checked in!
- Paul D. Anderson (3/18) Feb 22 2010 Thanks for taking the time to identify and resolve this. Its nice to see...
The Jump To: section on the phobos 2 docs could be made a lot easier
by sorting the anchors listed alphabetically.
I looked at the html source and noticed that they are generated by
some Javascript.
Here's a replacement for the function in there now that does this sorting:
<script>
function listanchors()
{
var a = document.getElementById("quickindex");
if (!a) return;
var newText = "";
var hash = new Array;
var n = 0;
var values = new Array;
// List all anchors.
for (var i = 0; i < document.anchors.length; i++)
{
var a = document.anchors[i];
var text = a.name;
if (hash[text] > 0) continue;
hash[text] = 1;
values[n++] = a.name
}
values.sort();
for(var i = 0; i < values.length; i++) {
var a = values[i];
+ a + '</span></a> ';
}
if (newText != "") newText = "<p><b>Jump to:</b> " + newText + '</p>';
var a = document.getElementById("quickindex");
a.innerHTML = newText;
}
</script>
I'm not sure where this was generated from, or how to submit a real
patch, so I posted it here and on the bugzilla:
http://d.puremagic.com/issues/show_bug.cgi?id=3840
It's a little thing, but one that I think would be a nice help.
Feb 21 2010
Adam Ruppe wrote:The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now that does this sorting:[snip] Sweet, thanks. Andrei
Feb 21 2010
Andrei Alexandrescu wrote:Adam Ruppe wrote:and checked in!The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now that does this sorting:[snip] Sweet, thanks.
Feb 21 2010
Walter Bright Wrote:Andrei Alexandrescu wrote:Thanks for taking the time to identify and resolve this. Its nice to see the communty in action!Adam Ruppe wrote:and checked in!The Jump To: section on the phobos 2 docs could be made a lot easier by sorting the anchors listed alphabetically. I looked at the html source and noticed that they are generated by some Javascript. Here's a replacement for the function in there now that does this sorting:[snip] Sweet, thanks.
Feb 22 2010








Paul D. Anderson <paul.d.anderson boeing.com>