-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcheckURL.js
More file actions
29 lines (27 loc) · 867 Bytes
/
checkURL.js
File metadata and controls
29 lines (27 loc) · 867 Bytes
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
//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 'terms':
$('.toctree-l1 > a:contains("Terms")').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:
}