]>
Commit | Line | Data |
---|---|---|
ce493c5d IB |
1 | </div><!--/.wrapper--> |
2 | ||
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'), | |
10 | i = indexes.length; | |
11 | while (i--){ | |
12 | var a = indexes[i].getElementsByTagName('a')[0]; | |
13 | a.href = '/' + uri + '/' + a.getAttribute('href',2); | |
14 | } | |
15 | } | |
16 | ||
17 | function getAjax(url, success) { | |
18 | var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); | |
19 | xhr.open('GET', url); | |
20 | xhr.onreadystatechange = function() { | |
21 | if (xhr.readyState>3 && xhr.status==200) | |
22 | success(xhr.responseText); | |
23 | }; | |
24 | xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); | |
25 | xhr.send(); | |
26 | return xhr; | |
27 | } | |
28 | getAjax("title", function(data) { | |
29 | document.getElementById('pagetitle').innerHTML = data; | |
30 | }); | |
31 | </script> |