-
-
Save tcyrus/bbfecd1409f78fdb23111698e95f7b94 to your computer and use it in GitHub Desktop.
js code to get all github repo links on a page
This file contains 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
// https links | |
console.log([].slice.call(document.getElementsByTagName('a')).map(z => z['href']).filter(z => z.match(/^https:\/\/github.com\/ORGANIZATION\/[0-9A-Za-z\-\_\.]+$/)).join('\n')) | |
// ssh links | |
console.log([].slice.call(document.getElementsByTagName('a')).map(z => z['href']).filter(z => z.match(/^https:\/\/github.com\/ORGANIZATION\/[0-9A-Za-z\-\_\.]+$/)).map(z => '[email protected]:'+z.substring(19)+'.git').join('\n')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment