mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 04:19:36 +08:00
DOC: Refactor Javascript for listing doc versions to only have the version in one place.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user