(navList !== null) {
    var url = window.location.href;
    var lindex = url.lastIndexOf('/');
    url = url
      .slice(lindex + 1)
      .toLowerCase();
    var aTags = navList.getElementsByTagName('a');
    var currentindex = -1;
    for (var i = 0; i < aTags.length; i++) {
      var lowerhref = aTags[i]
        .href
        .toLowerCase();
      if (lowerhref.indexOf('/' + url) !== -1) {
        currentindex = i;
        aTags[i]
          .classList
          .add('active');
        break;
      }
 