Created
March 20, 2014 19:30
-
-
Save connormckelvey/9671914 to your computer and use it in GitHub Desktop.
Copy Hostname from Chrome
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
Simple JS Bookmarket to let you quicly copy just the hostname of a url. Chrome hides http:// in the url which makes it hard to easily copy and paste a hostname. If you use a shell or ftp client a lot you know what I am talking about. Here is the script: | |
javascript:void( | |
function(){var u = window.location.hostname.replace(/^www\./,''); | |
window.prompt('Copy URL to Clipboard CMD/CTRL + C',u); | |
}() | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy and paste the function above and add it as a bookmark.