mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-03 13:11:25 +08:00
Safely check doc version in javascript.
This commit is contained in:
@@ -5,9 +5,11 @@ function insert_version_links() {
|
||||
|
||||
for (i = 0; i < labels.length; i++){
|
||||
document.write('<li>');
|
||||
if ((DOCUMENTATION_OPTIONS['VERSION'] == labels[i]) ||
|
||||
(DOCUMENTATION_OPTIONS['VERSION'].match(/dev$/) && (i == 0))) {
|
||||
document.write('▸ ');
|
||||
if (typeof(DOCUMENTATION_OPTIONS) !== 'undefined') {
|
||||
if ((DOCUMENTATION_OPTIONS['VERSION'] == labels[i]) ||
|
||||
(DOCUMENTATION_OPTIONS['VERSION'].match(/dev$/) && (i == 0))) {
|
||||
document.write('▸ ');
|
||||
}
|
||||
}
|
||||
document.write('<a href="URL">skimage VERSION</a> </li>\n'
|
||||
.replace('VERSION', labels[i])
|
||||
|
||||
Reference in New Issue
Block a user