Prevented the page's respective .html to show up in the package list
This commit is contained in:
parent
8bf1163a13
commit
781aaafcf1
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ async function fetchPackages(uri) {
|
||||||
linksNodeList.forEach((link) => {
|
linksNodeList.forEach((link) => {
|
||||||
const linkText = link.innerHTML.trim();
|
const linkText = link.innerHTML.trim();
|
||||||
const forbiddenLinks = ["Name", "Last modified", "Size", "Description", "Parent Directory"];
|
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 packageLink = document.createElement("a");
|
||||||
const newRedirect = uri + "/" + link.href.split("/").pop();
|
const newRedirect = uri + "/" + link.href.split("/").pop();
|
||||||
packageLink.href = newRedirect;
|
packageLink.href = newRedirect;
|
||||||
|
|
Loading…
Reference in a new issue