-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcheckURL.js
More file actions
40 lines (38 loc) · 1.23 KB
/
checkURL.js
File metadata and controls
40 lines (38 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//Remove <ul> from Releases
$('.toctree-l1 > a:contains("Releases")').siblings().remove();
//Check URL
var path = window.location.href;
var pathName = path.split('/');
var num = pathName.length - 3;
switch(pathName[num]) {
case 'gettingstarted':
$('.toctree-l1 > a:contains("Getting Started")').attr('state', 'open');
break;
case 'installation':
$('.toctree-l1 > a:contains("Installation")').attr('state', 'open');
break;
case 'operations':
$('.toctree-l1 > a:contains("Operations")').attr('state', 'open');
break;
case 'developer':
$('.toctree-l1 > a:contains("Developer")').attr('state', 'open');
break;
case 'components':
$('.toctree-l1 > a:contains("Components")').attr('state', 'open');
break;
case 'topologies':
$('.toctree-l1 > a:contains("Topologies")').attr('state', 'open');
break;
case 'contributing':
$('.toctree-l1 > a:contains("Contributing")').attr('state', 'open');
break;
case 'client':
$('.toctree-l1 > a:contains("Client Reference")').attr('state', 'open');
break;
case 'server':
$('.toctree-l1 > a:contains("Server Reference")').attr('state', 'open');
break;
default:
$('.toctree-l1 > a:contains("Version")').attr('state', 'close');
break;
}