Last active
September 23, 2017 23:46
-
-
Save Lewiscowles1986/ed13dff6b60bbc7f40af06e25eeaad40 to your computer and use it in GitHub Desktop.
Git Clone Auto (per-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
(function(username) { | |
const repos_css_Selector = '[itemprop*="codeRepository"]'; | |
const git_clone_command_string = 'git clone git@github.com:'; | |
return [].slice.call( | |
document.querySelectorAll(repos_css_Selector) | |
).map(function(val, idx) { | |
return git_clone_command_string+username+'/'+val.innerText; | |
}).join('\n'); | |
})(document.querySelector( | |
'.p-nickname.vcard-username.d-block,.org-name.lh-condensed' | |
).innerText); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment