-var NAVS = {
- 'home': /^\/$/,
- 'pb': /^\/(?:pb|sol)\//,
- 'ct': /^\/(?:ct|st|ed)\//,
- 'log': /^\/log\//,
- 'us': /^\/us\//,
- 'account': /^\/account$/,
- 'contribute': /^\/contribute$/,
+const NAVS = {
+ home: /^\/$/,
+ pb: /^\/(?:pb|sol)\//,
+ ct: /^\/(?:ct|st|ed)\//,
+ log: /^\/log\//,
+ us: /^\/us\//,
+ account: /^\/account$/,
+ contribute: /^\/contribute$/,
+ about: /^\/about$/,
};
$(function(){
- var path = location.pathname;
- for (var nav in NAVS)
+ const path = location.pathname;
+ for (const nav in NAVS)
if(path.match(NAVS[nav]))
- $('#nav-' + nav)[0].classList.add('active');
+ q('#nav-' + nav).classList.add('active');
});