Created
May 23, 2013 00:28
-
-
Save dergachev/5631965 to your computer and use it in GitHub Desktop.
Onetab export format to gists;
This file contains hidden or 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
// works on selected text | |
var selection = window.getSelection().toString(); | |
if (selection) { | |
selection = selection.match(/[^\r\n]+/g) | |
.map(function(a) { return "* " + a; }). | |
join("\n"); | |
prompt("Here's your markdown:", selection); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment