if (link.getAttribute('href').includes(current)) {

link.classList.add('active');