Prevented the page's respective .html to show up in the package list

This commit is contained in:
Arzumify 2024-08-03 15:33:14 +01:00
parent 8bf1163a13
commit 781aaafcf1

View file

@ -13,7 +13,7 @@ async function fetchPackages(uri) {
linksNodeList.forEach((link) => {
const linkText = link.innerHTML.trim();
const forbiddenLinks = ["Name", "Last modified", "Size", "Description", "Parent Directory"];
if (!forbiddenLinks.includes(linkText)) {
if (!forbiddenLinks.includes(linkText) && !linkText.endsWith(".html")) {
const packageLink = document.createElement("a");
const newRedirect = uri + "/" + link.href.split("/").pop();
packageLink.href = newRedirect;