Upgrade to ECMAScript 6
[plack-app-gruntmaster.git] / js / 90-nav.js
index 4b59af41d86a7d7e1cbbd9cc798f226766235b30..03dcb8257931dff52d9775d8aea71e2bd23a8db5 100644 (file)
@@ -1,16 +1,16 @@
-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$/,
 };
 
 $(function(){
-       var path = location.pathname;
-       for (var nav in NAVS)
+       let path = location.pathname;
+       for (let nav in NAVS)
                if(path.match(NAVS[nav]))
                        $('#nav-' + nav)[0].classList.add('active');
 });
This page took 0.010039 seconds and 4 git commands to generate.