DOC: Refactor Javascript for listing doc versions to only have the version in one place.

This commit is contained in:
Stefan van der Walt
2012-02-08 01:40:56 -08:00
parent 38d432fe7e
commit 87a0fd1abb
+2 -7
View File
@@ -1,17 +1,12 @@
function insert_version_links() {
var labels = ['0.5dev', '0.4', '0.3'];
var links = ['http://scikits-image.org/docs/dev/index.html',
'http://scikits-image.org/docs/0.4/index.html',
'http://scikits-image.org/docs/0.3/index.html'];
var labels = ['dev', '0.4', '0.3'];
document.write('<ul class="versions">\n');
for (i = 0; i < labels.length; i++){
document.write('<li> <a href="URL">skimage VERSION</a> </li>\n'
.replace('VERSION', labels[i])
.replace('URL', links[i]));
.replace('URL', 'http://scikits-image.org/docs/' + labels[i]));
}
document.write('</ul>\n');
}