Skip to content

Commit

Permalink
Fix links to readme.md files
Browse files Browse the repository at this point in the history
  • Loading branch information
rschu1ze committed Jan 5, 2025
1 parent 43661bf commit 0a54f4d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,7 @@ <h2>Loading...</h2>
const anchor = document.createElement("a");

if (el.type === "file") {
if (el.name.endsWith(".md")) {
anchor.setAttribute(
"href",
el.path.split(".").slice(0, -1).join(".")
);
} else {
anchor.setAttribute("href", el.download_url);
}
anchor.setAttribute("href", el.download_url);
} else if (el.type === "dir") {
anchor.setAttribute("href", "?path=" + encodeURIComponent(el.path));
}
Expand Down

0 comments on commit 0a54f4d

Please sign in to comment.