Last active
January 30, 2020 22:02
-
-
Save dinnouti/e348b77c14dca157188ff0ae704e84dc to your computer and use it in GitHub Desktop.
Copy URL as Markdown as a browser bookmark
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
// Chrome version | |
javascript: (function() { | |
let text = '[' + document.title + '](' + location.href + ')'; | |
navigator.clipboard.writeText(text) | |
.then(() => { | |
console.log('Text copied to clipboard: ', text); | |
}) | |
.catch(err => { | |
console.error('Could not copy text: ', err); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment