3 <script type=
"text/javascript">
4 // grab the
2nd child and add the parent class. tr:nth-child(
2)
5 document.getElementsByTagName('tr')[
1].className = 'parent';
6 // fix links when not adding a / at the end of the URI
7 var uri = window.location.pathname.substr(
1);
8 if (uri.length
> 0 && uri.substring(uri.length-
1) != '/'){
9 var indexes = document.getElementsByClassName('indexcolname'),
12 var a = indexes[i].getElementsByTagName('a')[
0];
13 a.href = '/' + uri + '/' + a.getAttribute('href',
2);
17 function getAjax(url, success) {
18 var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
20 xhr.onreadystatechange = function() {
21 if (xhr.readyState
>3 && xhr.status==
200)
22 success(xhr.responseText);
24 xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
28 getAjax(
"title", function(data) {
29 document.getElementById('pagetitle').innerHTML = data;