|
| 1 | +//Remove <ul> from Releases |
| 2 | +$('.toctree-l1 > a').each(function(){ |
| 3 | + if($(this).html() == "Releases") { |
| 4 | + $(this).parent().html('<a class="reference internal" href="/latest/releases/">Releases</a>'); |
| 5 | + } |
| 6 | +}); |
| 7 | + |
| 8 | +//Check URL |
| 9 | +var path = window.location.href; |
| 10 | +var pathName = path.split('/'); |
| 11 | +var num = pathName.length - 3; |
| 12 | +var gettingstarted, terms, client, server, contributing; |
| 13 | + |
| 14 | +switch(pathName[num]) { |
| 15 | + case 'gettingstarted': |
| 16 | + //case at Getting Started |
| 17 | + $('.toctree-l1 > a').each(function(){ |
| 18 | + if($(this).html() == "Getting Started") { |
| 19 | + $(this).attr('state', 'open'); |
| 20 | + } |
| 21 | + }); |
| 22 | + break; |
| 23 | + case 'terms': |
| 24 | + //case at Terms |
| 25 | + $('.toctree-l1 > a').each(function(){ |
| 26 | + if($(this).html() == "Terms") { |
| 27 | + $(this).attr('state', 'open'); |
| 28 | + } |
| 29 | + }); |
| 30 | + break; |
| 31 | + case 'client': |
| 32 | + //case at Client Reference |
| 33 | + $('.toctree-l1 > a').each(function(){ |
| 34 | + if($(this).html() == "Client Reference") { |
| 35 | + $(this).attr('state', 'open'); |
| 36 | + } |
| 37 | + }); |
| 38 | + break; |
| 39 | + case 'server': |
| 40 | + //case at Server Reference |
| 41 | + $('.toctree-l1 > a').each(function(){ |
| 42 | + if($(this).html() == "Server Reference") { |
| 43 | + $(this).attr('state', 'open'); |
| 44 | + } |
| 45 | + }); |
| 46 | + break; |
| 47 | + case 'contributing': |
| 48 | + //case at Contributing |
| 49 | + $('.toctree-l1 > a').each(function(){ |
| 50 | + if($(this).html() == "Contributing") { |
| 51 | + $(this).attr('state', 'open'); |
| 52 | + } |
| 53 | + }); |
| 54 | + break; |
| 55 | + case 'releases': |
| 56 | + //code this out when releases gets filled out |
| 57 | + break; |
| 58 | + default: |
| 59 | +} |
| 60 | + |
0 commit comments