Created
October 27, 2019 03:46
-
-
Save titangene/cdd5907a1190f5774e84d874e7076410 to your computer and use it in GitHub Desktop.
Convert chrome tab link to Markdown link format and copy
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() { | |
var title = document.title; | |
var url = location.href; | |
var textArea = document.createElement('textarea'); | |
var copyText = `[${title}](${url})`; | |
textArea.value = copyText; | |
document.body.appendChild(textArea); | |
textArea.select(); | |
document.execCommand('Copy'); | |
textArea.remove(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment