Created
June 3, 2013 19:53
-
-
Save Rarst/5700850 to your computer and use it in GitHub Desktop.
Bookmarklet for markdown link of current 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
javascript:(function () { | |
var selection = window.getSelection().toString(); | |
var anchor = selection ? selection : document.title; | |
void(prompt('', '[' + anchor + '](' + location.href + ')')); | |
})(); |
I can write anything. It compiling, making sense and/or doing something is another matter entirely. :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And you say you can't write javascript!