Перейти к содержанию

MediaWiki:Common.js: различия между версиями

нет описания правки
Нет описания правки
Нет описания правки
Строка 11: Строка 11:
   links.forEach(function (link) {
   links.forEach(function (link) {
     var linkhref = location.protocol + '//' + location.host + link.getAttribute('href').trim();
     var linkhref = location.protocol + '//' + location.host + link.getAttribute('href').trim();
 
    console.log(currentPageHref + '=' + linkhref);
console.log(currentPageHref + '=' + linkhref);
     if (currentPageHref === linkhref) {
      
    link.closest('li').classList.add('a-current');
      if (currentPageHref === linkhref) {
      link.closest('li').classList.add('a-current');
     }
     }
   });
   });
}
}