Last active
March 15, 2017 04:37
-
-
Save rmateu/7056e157dd069349ffce09be3e3d8e30 to your computer and use it in GitHub Desktop.
Bookmarklet Markdown Reference Link
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 bookmarklet() { | |
var url = location.origin + location.pathname, | |
title = document.title, | |
site = location.host, | |
site = site.replace(/^www./,''), | |
site = site.substring(0, 4); | |
text = window.getSelection().toString(), | |
markdownLinkblog = '[' + site + ']' + ': ' + url + ' "' + document.title + '"'; | |
window.prompt('Copy to clipboard: ⌘+C or Ctrl+C then Enter', markdownLinkblog); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment