Last active
August 26, 2022 02:47
-
-
Save anthonydahanne/3324cb9398185a195d5ead9bead55887 to your computer and use it in GitHub Desktop.
Extract all links (with a non empry rel attribute) from a webpage - to run from firefox or chrome, convenient for hackernews
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
Array.prototype.slice | |
.call(document.querySelectorAll("a")) | |
.filter(link => link.attributes.rel).map(link => link.href) | |
.sort() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment