function is_paged() {
const arr = window.location.pathname.split("/");
let index = arr.indexOf("page");
return index >= 0 ? +arr[++index] : false
}
for (var i = 0; i < menuLinks.length; i++) {
const page = is_paged();
if (menuLinks[i].pathname === currentPage) {
menuLinks[i].classList.add("active");
} else if (page == i){
menuLinks[i].classList.add("active");
}
}