Created
March 14, 2025 15:06
-
-
Save limitedeternity/ac422aaa9e03d591ee16f98b5e6aeb3b to your computer and use it in GitHub Desktop.
Prettify pypi simple index page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let list = document.createElement("ul"); | |
let links = Array.from(document.body.getElementsByTagName("a")).sort((a, b) => a.innerText.localeCompare(b.innerText, undefined, { numeric: true, sensitivity: "base" })); | |
for (let link of links) | |
{ | |
let elem = document.createElement("li"); | |
list.appendChild(elem); | |
document.body.removeChild(link); | |
elem.appendChild(link); | |
} | |
document.body.appendChild(list); |
Author
limitedeternity
commented
Mar 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment