Forked from dergachev/_onetab_export_markdown.bookmarklet.js
Created
January 14, 2021 15:18
-
-
Save binarica/6ab94413038d3191414ae78e4706f4aa to your computer and use it in GitHub Desktop.
Onetab export format to gists;
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
// 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