]>
Commit | Line | Data |
---|---|---|
8345760a MG |
1 | const NAVS = { |
2 | home: /^\/$/, | |
3 | pb: /^\/(?:pb|sol)\//, | |
4 | ct: /^\/(?:ct|st|ed)\//, | |
5 | log: /^\/log\//, | |
6 | us: /^\/us\//, | |
7 | account: /^\/account$/, | |
8 | contribute: /^\/contribute$/, | |
f48eff98 | 9 | help: /^\/help$/, |
7093e9ba | 10 | }; |
4b4a8137 | 11 | |
7093e9ba | 12 | $(function(){ |
65d5cb3b MG |
13 | const path = location.pathname; |
14 | for (const nav in NAVS) | |
7093e9ba | 15 | if(path.match(NAVS[nav])) |
dee46c5b | 16 | q('#nav-' + nav).classList.add('active'); |
7093e9ba | 17 | }); |