This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #92 -- correct some JavaScript in docs for "Releases" link.
- Loading branch information
Showing
1 changed file
with
6 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,29 @@ | ||
//Remove <ul> from Releases | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Releases") { | ||
$(this).parent().html('<a class="reference internal" href="/latest/releases/">Releases</a>'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Releases")').siblings().remove(); | ||
|
||
//Check URL | ||
var path = window.location.href; | ||
var pathName = path.split('/'); | ||
var num = pathName.length - 3; | ||
var gettingstarted, terms, client, server, contributing; | ||
|
||
switch(pathName[num]) { | ||
case 'gettingstarted': | ||
//case at Getting Started | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Getting Started") { | ||
$(this).attr('state', 'open'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Getting Started")').attr('state', 'open'); | ||
break; | ||
case 'terms': | ||
//case at Terms | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Terms") { | ||
$(this).attr('state', 'open'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Terms")').attr('state', 'open'); | ||
break; | ||
case 'client': | ||
//case at Client Reference | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Client Reference") { | ||
$(this).attr('state', 'open'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Client Reference")').attr('state', 'open'); | ||
break; | ||
case 'server': | ||
//case at Server Reference | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Server Reference") { | ||
$(this).attr('state', 'open'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Server Reference")').attr('state', 'open'); | ||
break; | ||
case 'contributing': | ||
//case at Contributing | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).html() == "Contributing") { | ||
$(this).attr('state', 'open'); | ||
} | ||
}); | ||
$('.toctree-l1 > a:contains("Contributing")').attr('state', 'open'); | ||
break; | ||
case 'releases': | ||
//code this out when releases gets filled out | ||
break; | ||
default: | ||
} | ||
|