]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - nixops/modules/websites/apache/theme/footer.html
Cleanup etherpad-lite module
[perso/Immae/Config/Nix.git] / nixops / modules / websites / apache / theme / footer.html
CommitLineData
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)
5document.getElementsByTagName('tr')[1].className = 'parent';
6// fix links when not adding a / at the end of the URI
7var uri = window.location.pathname.substr(1);
8if (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
17function 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}
28getAjax("title", function(data) {
29 document.getElementById('pagetitle').innerHTML = data;
30});
31</script>